All of lore.kernel.org
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 14:50 ` Puranjay Mohan
  0 siblings, 0 replies; 12+ messages in thread
From: puranjay12 @ 2019-04-29 14:50 UTC (permalink / raw)


Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
index d9b02ff66259..599da6c977ed 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
 	return sprintf(buf, mask "\n", value);				\
 }
 
-#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
+#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
 property_write(prop, prop_type, mask, check)				\
 property_read(prop, mask)						\
 
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 14:50 ` Puranjay Mohan
  0 siblings, 0 replies; 12+ messages in thread
From: Puranjay Mohan @ 2019-04-29 14:50 UTC (permalink / raw)


Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
---
 drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
index d9b02ff66259..599da6c977ed 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
 	return sprintf(buf, mask "\n", value);				\
 }
 
-#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
+#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
 property_write(prop, prop_type, mask, check)				\
 property_read(prop, mask)						\
 
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 14:56   ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: greg @ 2019-04-29 14:56 UTC (permalink / raw)


On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
> Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> ---

I think your subject line needs a bit of work :)

Also, I can't take patches without any changelog text.

>  drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> index d9b02ff66259..599da6c977ed 100644
> --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
>  	return sprintf(buf, mask "\n", value);				\
>  }
>  
> -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
>  property_write(prop, prop_type, mask, check)				\
>  property_read(prop, mask)						\

Wait, did you build this patch?  Are you sure it is doing what you think
it is doing?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 14:56   ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2019-04-29 14:56 UTC (permalink / raw)


On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
> Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> ---

I think your subject line needs a bit of work :)

Also, I can't take patches without any changelog text.

>  drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> index d9b02ff66259..599da6c977ed 100644
> --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
>  	return sprintf(buf, mask "\n", value);				\
>  }
>  
> -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
>  property_write(prop, prop_type, mask, check)				\
>  property_read(prop, mask)						\

Wait, did you build this patch?  Are you sure it is doing what you think
it is doing?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 15:17     ` Puranjay Mohan
  0 siblings, 0 replies; 12+ messages in thread
From: puranjay12 @ 2019-04-29 15:17 UTC (permalink / raw)


On Mon, Apr 29, 2019 at 04:56:35PM +0200, Greg KH wrote:
> On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
> > Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> > ---
> 
> I think your subject line needs a bit of work :)
> 
> Also, I can't take patches without any changelog text.
> 
> >  drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > index d9b02ff66259..599da6c977ed 100644
> > --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> > +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
> >  	return sprintf(buf, mask "\n", value);				\
> >  }
> >  
> > -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> > +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
> >  property_write(prop, prop_type, mask, check)				\
> >  property_read(prop, mask)						\
> 
> Wait, did you build this patch?  Are you sure it is doing what you think
> it is doing?
> 
> thanks,
> 
> greg k-h

It is my first patch ever, can you guide me on how to resend the patch
with the corrections.
After adding the parentheses around the Macro, the Error was not showing
up with the checkpatch.pl so I thought it corrected it.

thanks,

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 15:17     ` Puranjay Mohan
  0 siblings, 0 replies; 12+ messages in thread
From: Puranjay Mohan @ 2019-04-29 15:17 UTC (permalink / raw)


On Mon, Apr 29, 2019 at 04:56:35PM +0200, Greg KH wrote:
> On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
> > Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> > ---
> 
> I think your subject line needs a bit of work :)
> 
> Also, I can't take patches without any changelog text.
> 
> >  drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > index d9b02ff66259..599da6c977ed 100644
> > --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> > +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
> >  	return sprintf(buf, mask "\n", value);				\
> >  }
> >  
> > -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> > +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
> >  property_write(prop, prop_type, mask, check)				\
> >  property_read(prop, mask)						\
> 
> Wait, did you build this patch?  Are you sure it is doing what you think
> it is doing?
> 
> thanks,
> 
> greg k-h

It is my first patch ever, can you guide me on how to resend the patch
with the corrections.
After adding the parentheses around the Macro, the Error was not showing
up with the checkpatch.pl so I thought it corrected it.

thanks,

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 15:34       ` Shuah Khan
  0 siblings, 0 replies; 12+ messages in thread
From: skhan @ 2019-04-29 15:34 UTC (permalink / raw)


On 4/29/19 9:17 AM, Puranjay Mohan wrote:
> On Mon, Apr 29, 2019 at 04:56:35PM +0200, Greg KH wrote:
>> On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
>>> Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
>>> ---
>>
>> I think your subject line needs a bit of work :)
>>
>> Also, I can't take patches without any changelog text.
>>
>>>   drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
>>> index d9b02ff66259..599da6c977ed 100644
>>> --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
>>> +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
>>> @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
>>>   	return sprintf(buf, mask "\n", value);				\
>>>   }
>>>   
>>> -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
>>> +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
>>>   property_write(prop, prop_type, mask, check)				\
>>>   property_read(prop, mask)						\
>>
>> Wait, did you build this patch?  Are you sure it is doing what you think
>> it is doing?
>>
>> thanks,
>>
>> greg k-h
> 
> It is my first patch ever, can you guide me on how to resend the patch
> with the corrections.
> After adding the parentheses around the Macro, the Error was not showing
> up with the checkpatch.pl so I thought it corrected it.
>
Did you build and run tests to make sure you change works?

Please go through the following to understand all about sending your 
first patch.

https://wiki.linuxfoundation.org/lkmp/lkmp_getting_started

This should tell you the steps to follow before sending the patch.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 15:34       ` Shuah Khan
  0 siblings, 0 replies; 12+ messages in thread
From: Shuah Khan @ 2019-04-29 15:34 UTC (permalink / raw)


On 4/29/19 9:17 AM, Puranjay Mohan wrote:
> On Mon, Apr 29, 2019 at 04:56:35PM +0200, Greg KH wrote:
>> On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
>>> Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
>>> ---
>>
>> I think your subject line needs a bit of work :)
>>
>> Also, I can't take patches without any changelog text.
>>
>>>   drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
>>> index d9b02ff66259..599da6c977ed 100644
>>> --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
>>> +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
>>> @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
>>>   	return sprintf(buf, mask "\n", value);				\
>>>   }
>>>   
>>> -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
>>> +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
>>>   property_write(prop, prop_type, mask, check)				\
>>>   property_read(prop, mask)						\
>>
>> Wait, did you build this patch?  Are you sure it is doing what you think
>> it is doing?
>>
>> thanks,
>>
>> greg k-h
> 
> It is my first patch ever, can you guide me on how to resend the patch
> with the corrections.
> After adding the parentheses around the Macro, the Error was not showing
> up with the checkpatch.pl so I thought it corrected it.
>
Did you build and run tests to make sure you change works?

Please go through the following to understand all about sending your 
first patch.

https://wiki.linuxfoundation.org/lkmp/lkmp_getting_started

This should tell you the steps to follow before sending the patch.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 17:17         ` Puranjay Mohan
  0 siblings, 0 replies; 12+ messages in thread
From: puranjay12 @ 2019-04-29 17:17 UTC (permalink / raw)


On Mon, Apr 29, 2019 at 09:34:41AM -0600, Shuah Khan wrote:
> On 4/29/19 9:17 AM, Puranjay Mohan wrote:
> > On Mon, Apr 29, 2019 at 04:56:35PM +0200, Greg KH wrote:
> > > On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
> > > > Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> > > > ---
> > > 
> > > I think your subject line needs a bit of work :)
> > > 
> > > Also, I can't take patches without any changelog text.
> > > 
> > > >   drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > index d9b02ff66259..599da6c977ed 100644
> > > > --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
> > > >   	return sprintf(buf, mask "\n", value);				\
> > > >   }
> > > > -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> > > > +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
> > > >   property_write(prop, prop_type, mask, check)				\
> > > >   property_read(prop, mask)						\
> > > 
> > > Wait, did you build this patch?  Are you sure it is doing what you think
> > > it is doing?
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > 
> > It is my first patch ever, can you guide me on how to resend the patch
> > with the corrections.
> > After adding the parentheses around the Macro, the Error was not showing
> > up with the checkpatch.pl so I thought it corrected it.
> > 
> Did you build and run tests to make sure you change works?
> 
> Please go through the following to understand all about sending your first
> patch.
> 
> https://wiki.linuxfoundation.org/lkmp/lkmp_getting_started
> 
> This should tell you the steps to follow before sending the patch.
> 
> thanks,
> -- Shuah


I built the driver and this change caused a compilation error. Sorry for
sending a wrong patch.
Please help me in solving the checkpatch.pl error.

ERROR: Macros with complex values should be enclosed in parentheses
#2003: FILE: drivers/staging/media/bcm2048/radio-bcm2048.c:2003:
+#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
+property_write(prop, prop_type, mask, check)				\
+property_read(prop, mask)						\
+

Thanks and Regards.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 17:17         ` Puranjay Mohan
  0 siblings, 0 replies; 12+ messages in thread
From: Puranjay Mohan @ 2019-04-29 17:17 UTC (permalink / raw)


On Mon, Apr 29, 2019 at 09:34:41AM -0600, Shuah Khan wrote:
> On 4/29/19 9:17 AM, Puranjay Mohan wrote:
> > On Mon, Apr 29, 2019 at 04:56:35PM +0200, Greg KH wrote:
> > > On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
> > > > Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> > > > ---
> > > 
> > > I think your subject line needs a bit of work :)
> > > 
> > > Also, I can't take patches without any changelog text.
> > > 
> > > >   drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > index d9b02ff66259..599da6c977ed 100644
> > > > --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
> > > >   	return sprintf(buf, mask "\n", value);				\
> > > >   }
> > > > -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> > > > +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
> > > >   property_write(prop, prop_type, mask, check)				\
> > > >   property_read(prop, mask)						\
> > > 
> > > Wait, did you build this patch?  Are you sure it is doing what you think
> > > it is doing?
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > 
> > It is my first patch ever, can you guide me on how to resend the patch
> > with the corrections.
> > After adding the parentheses around the Macro, the Error was not showing
> > up with the checkpatch.pl so I thought it corrected it.
> > 
> Did you build and run tests to make sure you change works?
> 
> Please go through the following to understand all about sending your first
> patch.
> 
> https://wiki.linuxfoundation.org/lkmp/lkmp_getting_started
> 
> This should tell you the steps to follow before sending the patch.
> 
> thanks,
> -- Shuah


I built the driver and this change caused a compilation error. Sorry for
sending a wrong patch.
Please help me in solving the checkpatch.pl error.

ERROR: Macros with complex values should be enclosed in parentheses
#2003: FILE: drivers/staging/media/bcm2048/radio-bcm2048.c:2003:
+#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
+property_write(prop, prop_type, mask, check)				\
+property_read(prop, mask)						\
+

Thanks and Regards.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 17:46           ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: gregkh @ 2019-04-29 17:46 UTC (permalink / raw)


On Mon, Apr 29, 2019 at 10:47:55PM +0530, Puranjay Mohan wrote:
> On Mon, Apr 29, 2019 at 09:34:41AM -0600, Shuah Khan wrote:
> > On 4/29/19 9:17 AM, Puranjay Mohan wrote:
> > > On Mon, Apr 29, 2019 at 04:56:35PM +0200, Greg KH wrote:
> > > > On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
> > > > > Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> > > > > ---
> > > > 
> > > > I think your subject line needs a bit of work :)
> > > > 
> > > > Also, I can't take patches without any changelog text.
> > > > 
> > > > >   drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
> > > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > > index d9b02ff66259..599da6c977ed 100644
> > > > > --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > > +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > > @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
> > > > >   	return sprintf(buf, mask "\n", value);				\
> > > > >   }
> > > > > -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> > > > > +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
> > > > >   property_write(prop, prop_type, mask, check)				\
> > > > >   property_read(prop, mask)						\
> > > > 
> > > > Wait, did you build this patch?  Are you sure it is doing what you think
> > > > it is doing?
> > > > 
> > > > thanks,
> > > > 
> > > > greg k-h
> > > 
> > > It is my first patch ever, can you guide me on how to resend the patch
> > > with the corrections.
> > > After adding the parentheses around the Macro, the Error was not showing
> > > up with the checkpatch.pl so I thought it corrected it.
> > > 
> > Did you build and run tests to make sure you change works?
> > 
> > Please go through the following to understand all about sending your first
> > patch.
> > 
> > https://wiki.linuxfoundation.org/lkmp/lkmp_getting_started
> > 
> > This should tell you the steps to follow before sending the patch.
> > 
> > thanks,
> > -- Shuah
> 
> 
> I built the driver and this change caused a compilation error. Sorry for
> sending a wrong patch.
> Please help me in solving the checkpatch.pl error.
> 
> ERROR: Macros with complex values should be enclosed in parentheses
> #2003: FILE: drivers/staging/media/bcm2048/radio-bcm2048.c:2003:
> +#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> +property_write(prop, prop_type, mask, check)				\
> +property_read(prop, mask)						\
> +

How well do you understand C and how macros work with it?

Do you see anything wrong with this code?  What happens if you pass in
something "unusual" for one of those parameters?

Also, always remember that checkpatch.pl is a dumb perl script,
sometimes it is not correct, and may be ignored for some types of
things.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl
@ 2019-04-29 17:46           ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2019-04-29 17:46 UTC (permalink / raw)


On Mon, Apr 29, 2019 at 10:47:55PM +0530, Puranjay Mohan wrote:
> On Mon, Apr 29, 2019 at 09:34:41AM -0600, Shuah Khan wrote:
> > On 4/29/19 9:17 AM, Puranjay Mohan wrote:
> > > On Mon, Apr 29, 2019 at 04:56:35PM +0200, Greg KH wrote:
> > > > On Mon, Apr 29, 2019 at 08:20:02PM +0530, Puranjay Mohan wrote:
> > > > > Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> > > > > ---
> > > > 
> > > > I think your subject line needs a bit of work :)
> > > > 
> > > > Also, I can't take patches without any changelog text.
> > > > 
> > > > >   drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +-
> > > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > > index d9b02ff66259..599da6c977ed 100644
> > > > > --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > > +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> > > > > @@ -2000,7 +2000,7 @@ static ssize_t bcm2048_##prop##_read(struct device *dev,		\
> > > > >   	return sprintf(buf, mask "\n", value);				\
> > > > >   }
> > > > > -#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> > > > > +#define (DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check))		\
> > > > >   property_write(prop, prop_type, mask, check)				\
> > > > >   property_read(prop, mask)						\
> > > > 
> > > > Wait, did you build this patch?  Are you sure it is doing what you think
> > > > it is doing?
> > > > 
> > > > thanks,
> > > > 
> > > > greg k-h
> > > 
> > > It is my first patch ever, can you guide me on how to resend the patch
> > > with the corrections.
> > > After adding the parentheses around the Macro, the Error was not showing
> > > up with the checkpatch.pl so I thought it corrected it.
> > > 
> > Did you build and run tests to make sure you change works?
> > 
> > Please go through the following to understand all about sending your first
> > patch.
> > 
> > https://wiki.linuxfoundation.org/lkmp/lkmp_getting_started
> > 
> > This should tell you the steps to follow before sending the patch.
> > 
> > thanks,
> > -- Shuah
> 
> 
> I built the driver and this change caused a compilation error. Sorry for
> sending a wrong patch.
> Please help me in solving the checkpatch.pl error.
> 
> ERROR: Macros with complex values should be enclosed in parentheses
> #2003: FILE: drivers/staging/media/bcm2048/radio-bcm2048.c:2003:
> +#define DEFINE_SYSFS_PROPERTY(prop, prop_type, mask, check)		\
> +property_write(prop, prop_type, mask, check)				\
> +property_read(prop, mask)						\
> +

How well do you understand C and how macros work with it?

Do you see anything wrong with this code?  What happens if you pass in
something "unusual" for one of those parameters?

Also, always remember that checkpatch.pl is a dumb perl script,
sometimes it is not correct, and may be ignored for some types of
things.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-04-29 17:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-29 14:50 [Linux-kernel-mentees] [PATCH] staging: media: bcm2048: Fixed style error ERROR: Macros with complex values should be enclosed in parentheses found using scripts/checkpatch.pl puranjay12
2019-04-29 14:50 ` Puranjay Mohan
2019-04-29 14:56 ` greg
2019-04-29 14:56   ` Greg KH
2019-04-29 15:17   ` puranjay12
2019-04-29 15:17     ` Puranjay Mohan
2019-04-29 15:34     ` skhan
2019-04-29 15:34       ` Shuah Khan
2019-04-29 17:17       ` puranjay12
2019-04-29 17:17         ` Puranjay Mohan
2019-04-29 17:46         ` gregkh
2019-04-29 17:46           ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.