2022-10-26 14:16:53

by jovial umwari

[permalink] [raw]
Subject: [PATCH] Fixed[ERROR:trailing whitespace and braces around scalar initializer]

Using the checkpatch.pl script, found the below errors and fixed
ERROR: trailing whitespace
CHECK: Please don't use multiple blank lines
warning: braces around scalar initializer

Signed-off-by: UMWARI JOVIAL <[email protected]>
---
drivers/staging/most/dim2/dim2.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index 7a5f80e637a0..28259ce05024 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -987,7 +987,6 @@ static int rcar_gen2_enable(struct platform_device *pdev)
writel(0x04, dev->io_base + 0x600);
}

-
/* BBCR = 0b11 */
writel(0x03, dev->io_base + 0x500);
writel(0x0002FF02, dev->io_base + 0x508);
@@ -1084,7 +1083,6 @@ static const struct of_device_id dim2_of_match[] = {
{
.compatible = "xlnx,axi4-os62420_6pin-1.00.a",
},
- {},
};

MODULE_DEVICE_TABLE(of, dim2_of_match);
--
2.25.1



2022-10-26 14:48:45

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] Fixed[ERROR:trailing whitespace and braces around scalar initializer]

On Wed, Oct 26, 2022 at 04:28:38PM +0300, UMWARI JOVIAL wrote:
> Using the checkpatch.pl script, found the below errors and fixed
> ERROR: trailing whitespace
> CHECK: Please don't use multiple blank lines
> warning: braces around scalar initializer
>
> Signed-off-by: UMWARI JOVIAL <[email protected]>
> ---
> drivers/staging/most/dim2/dim2.c | 2 --
> 1 file changed, 2 deletions(-)

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
to review. All Linux kernel patches need to only do one thing at a
time. If you need to do multiple things (such as clean up all coding
style issues in a file/driver), do it in a sequence of patches, each
one doing only one thing. This will make it easier to review the
patches to ensure that they are correct, and to help alleviate any
merge issues that larger patches can cause.

- You did not specify a description of why the patch is needed, or
possibly, any description at all, in the email body. Please read the
section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatches for what is needed in order to
properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
and everyone else, to know what this patch is all about. Please read
the section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatches for what a proper Subject: line should
look like.

- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/SubmittingPatches for what needs to be done
here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

2022-10-26 17:52:56

by Nam Cao

[permalink] [raw]
Subject: Re: [PATCH] Fixed[ERROR:trailing whitespace and braces around scalar initializer]

On Wed, Oct 26, 2022 at 04:28:38PM +0300, UMWARI JOVIAL wrote:
> Using the checkpatch.pl script, found the below errors and fixed
> ERROR: trailing whitespace
> CHECK: Please don't use multiple blank lines
> warning: braces around scalar initializer
>
> Signed-off-by: UMWARI JOVIAL <[email protected]>
> ---
> drivers/staging/most/dim2/dim2.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
> index 7a5f80e637a0..28259ce05024 100644
> --- a/drivers/staging/most/dim2/dim2.c
> +++ b/drivers/staging/most/dim2/dim2.c
> @@ -987,7 +987,6 @@ static int rcar_gen2_enable(struct platform_device *pdev)
> writel(0x04, dev->io_base + 0x600);
> }
>
> -
> /* BBCR = 0b11 */
> writel(0x03, dev->io_base + 0x500);
> writel(0x0002FF02, dev->io_base + 0x508);
> @@ -1084,7 +1083,6 @@ static const struct of_device_id dim2_of_match[] = {
> {
> .compatible = "xlnx,axi4-os62420_6pin-1.00.a",
> },
> - {},

I'm no expert, but this looks like a null terminator and probably
should not be removed.

Best regards,
Nam

2022-10-27 08:07:53

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] Fixed[ERROR:trailing whitespace and braces around scalar initializer]

On Wed, Oct 26, 2022 at 07:14:34PM +0200, Nam Cao wrote:
> On Wed, Oct 26, 2022 at 04:28:38PM +0300, UMWARI JOVIAL wrote:
> > Using the checkpatch.pl script, found the below errors and fixed
> > ERROR: trailing whitespace
> > CHECK: Please don't use multiple blank lines
> > warning: braces around scalar initializer
> >
> > Signed-off-by: UMWARI JOVIAL <[email protected]>
> > ---
> > drivers/staging/most/dim2/dim2.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
> > index 7a5f80e637a0..28259ce05024 100644
> > --- a/drivers/staging/most/dim2/dim2.c
> > +++ b/drivers/staging/most/dim2/dim2.c
> > @@ -987,7 +987,6 @@ static int rcar_gen2_enable(struct platform_device *pdev)
> > writel(0x04, dev->io_base + 0x600);
> > }
> >
> > -
> > /* BBCR = 0b11 */
> > writel(0x03, dev->io_base + 0x500);
> > writel(0x0002FF02, dev->io_base + 0x508);
> > @@ -1084,7 +1083,6 @@ static const struct of_device_id dim2_of_match[] = {
> > {
> > .compatible = "xlnx,axi4-os62420_6pin-1.00.a",
> > },
> > - {},
>
> I'm no expert, but this looks like a null terminator and probably
> should not be removed.

You're absolutely correct. Also I tried to see why checkpatch.pl was
printing an error for this but it doesn't print an error for me.

regards,
dan carpenter


2022-10-27 19:16:46

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] Fixed[ERROR:trailing whitespace and braces around scalar initializer]

Hi UMWARI,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on linus/master v6.1-rc2]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/UMWARI-JOVIAL/Fixed-ERROR-trailing-whitespace-and-braces-around-scalar-initializer/20221026-212952
patch link: https://lore.kernel.org/r/20221026132838.GA44037%40rdm
patch subject: [PATCH] Fixed[ERROR:trailing whitespace and braces around scalar initializer]
config: hexagon-randconfig-r016-20221026
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/51dcd5e3ce065f3e92959e5f71505108d73997b5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review UMWARI-JOVIAL/Fixed-ERROR-trailing-whitespace-and-braces-around-scalar-initializer/20221026-212952
git checkout 51dcd5e3ce065f3e92959e5f71505108d73997b5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>, old ones prefixed by <<):

drivers/staging/most/dim2/most_dim2: struct of_device_id is 196 bytes. The last of 5 is:
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x78 0x6c 0x6e 0x78 0x2c 0x61 0x78 0x69 0x34 0x2d 0x6f 0x73 0x36 0x32 0x34 0x32 0x30 0x5f 0x36 0x70 0x69 0x6e 0x2d 0x31 0x2e 0x30 0x30 0x2e 0x61 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>> FATAL: modpost: drivers/staging/most/dim2/most_dim2: struct of_device_id is not terminated with a NULL entry!

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (2.97 kB)
config (155.47 kB)
Download all attachments

2022-10-28 05:04:30

by jovial umwari

[permalink] [raw]
Subject: Re: [PATCH] Fixed[ERROR:trailing whitespace and braces around scalar initializer]

well for the start it was not giving an error but after fixing blank
lines that is when i saw that
Thank you for the hint i fixed it

On Thu, 27 Oct 2022 at 10:56, Dan Carpenter <[email protected]> wrote:
>
> On Wed, Oct 26, 2022 at 07:14:34PM +0200, Nam Cao wrote:
> > On Wed, Oct 26, 2022 at 04:28:38PM +0300, UMWARI JOVIAL wrote:
> > > Using the checkpatch.pl script, found the below errors and fixed
> > > ERROR: trailing whitespace
> > > CHECK: Please don't use multiple blank lines
> > > warning: braces around scalar initializer
> > >
> > > Signed-off-by: UMWARI JOVIAL <[email protected]>
> > > ---
> > > drivers/staging/most/dim2/dim2.c | 2 --
> > > 1 file changed, 2 deletions(-)
> > >
> > > diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
> > > index 7a5f80e637a0..28259ce05024 100644
> > > --- a/drivers/staging/most/dim2/dim2.c
> > > +++ b/drivers/staging/most/dim2/dim2.c
> > > @@ -987,7 +987,6 @@ static int rcar_gen2_enable(struct platform_device *pdev)
> > > writel(0x04, dev->io_base + 0x600);
> > > }
> > >
> > > -
> > > /* BBCR = 0b11 */
> > > writel(0x03, dev->io_base + 0x500);
> > > writel(0x0002FF02, dev->io_base + 0x508);
> > > @@ -1084,7 +1083,6 @@ static const struct of_device_id dim2_of_match[] = {
> > > {
> > > .compatible = "xlnx,axi4-os62420_6pin-1.00.a",
> > > },
> > > - {},
> >
> > I'm no expert, but this looks like a null terminator and probably
> > should not be removed.
>
> You're absolutely correct. Also I tried to see why checkpatch.pl was
> printing an error for this but it doesn't print an error for me.
>
> regards,
> dan carpenter
>