[PATCH 1/1] slimbus: Fix struct and documentation alignment in stream.c

srinivas.kandagatla@linaro.org posted 6 patches 1 year, 7 months ago
There is a newer version of this series
[PATCH 1/1] slimbus: Fix struct and documentation alignment in stream.c
Posted by srinivas.kandagatla@linaro.org 1 year, 7 months ago
From: Amit Vadhavana <av2082000@gmail.com>

The placement of the `segdist_codes` array documentation was corrected
to conform with kernel documentation guidelines. The `@segdist_codes`
was placed incorrectly within the struct `segdist_code` documentation
block, which led to a potential misinterpretation of the code structure.

The `segdist_codes` array documentation was moved outside the struct
block, and a separate comment block was provided for it. This change
ensures that clarity and proper alignment with kernel documentation
standards are maintained.

A kernel-doc warning was addressed:
    ./drivers/slimbus/stream.c:49: warning: Excess struct member 'segdist_codes' description in 'segdist_code'

Signed-off-by: Amit Vadhavana <av2082000@gmail.com>
Reviewed-by: Ricardo B. Marliere <ricardo@marliere.net>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/slimbus/stream.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/slimbus/stream.c b/drivers/slimbus/stream.c
index 1d6b38657917..863ab3075d7e 100644
--- a/drivers/slimbus/stream.c
+++ b/drivers/slimbus/stream.c
@@ -18,15 +18,17 @@
  *		and the first slot of the next  consecutive Segment.
  * @segdist_code: Segment Distribution Code SD[11:0]
  * @seg_offset_mask: Segment offset mask in SD[11:0]
- * @segdist_codes: List of all possible Segmet Distribution codes.
  */
-static const struct segdist_code {
+struct segdist_code {
 	int ratem;
 	int seg_interval;
 	int segdist_code;
 	u32 seg_offset_mask;
 
-} segdist_codes[] = {
+};
+
+/* segdist_codes - List of all possible Segment Distribution codes. */
+static const struct segdist_code segdist_codes[] = {
 	{1,	1536,	0x200,	 0xdff},
 	{2,	768,	0x100,	 0xcff},
 	{4,	384,	0x080,	 0xc7f},
-- 
2.25.1
Re: [PATCH 1/1] slimbus: Fix struct and documentation alignment in stream.c
Posted by Greg KH 1 year, 7 months ago
On Fri, Jul 05, 2024 at 08:40:40AM +0100, srinivas.kandagatla@linaro.org wrote:
> From: Amit Vadhavana <av2082000@gmail.com>
> 
> The placement of the `segdist_codes` array documentation was corrected
> to conform with kernel documentation guidelines. The `@segdist_codes`
> was placed incorrectly within the struct `segdist_code` documentation
> block, which led to a potential misinterpretation of the code structure.
> 
> The `segdist_codes` array documentation was moved outside the struct
> block, and a separate comment block was provided for it. This change
> ensures that clarity and proper alignment with kernel documentation
> standards are maintained.
> 
> A kernel-doc warning was addressed:
>     ./drivers/slimbus/stream.c:49: warning: Excess struct member 'segdist_codes' description in 'segdist_code'
> 
> Signed-off-by: Amit Vadhavana <av2082000@gmail.com>
> Reviewed-by: Ricardo B. Marliere <ricardo@marliere.net>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  drivers/slimbus/stream.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

I don't think this was ment to be sent as part of the fastrpc patch
series :(

Can you fix this up and resend a v2?

thanks,

greg k-h
Re: [PATCH 1/1] slimbus: Fix struct and documentation alignment in stream.c
Posted by Srinivas Kandagatla 1 year, 7 months ago

On 05/07/2024 08:53, Greg KH wrote:
> On Fri, Jul 05, 2024 at 08:40:40AM +0100, srinivas.kandagatla@linaro.org wrote:
>> From: Amit Vadhavana <av2082000@gmail.com>
>>
>> The placement of the `segdist_codes` array documentation was corrected
>> to conform with kernel documentation guidelines. The `@segdist_codes`
>> was placed incorrectly within the struct `segdist_code` documentation
>> block, which led to a potential misinterpretation of the code structure.
>>
>> The `segdist_codes` array documentation was moved outside the struct
>> block, and a separate comment block was provided for it. This change
>> ensures that clarity and proper alignment with kernel documentation
>> standards are maintained.
>>
>> A kernel-doc warning was addressed:
>>      ./drivers/slimbus/stream.c:49: warning: Excess struct member 'segdist_codes' description in 'segdist_code'
>>
>> Signed-off-by: Amit Vadhavana <av2082000@gmail.com>
>> Reviewed-by: Ricardo B. Marliere <ricardo@marliere.net>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>>   drivers/slimbus/stream.c | 8 +++++---
>>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> I don't think this was ment to be sent as part of the fastrpc patch
> series :(
> 
> Can you fix this up and resend a v2?

True, this patch ended up in the folder.. did not realize that!

will resend!

thanks,
Srini
> 
> thanks,
> 
> greg k-h