Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1607278

Re: [PATCH] staging: most: Adds parentheses around macros with complex values

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] staging: most: Adds parentheses around macros with complex values
Date 2017-03-23 10:10 +0100
Message-ID <to6UP-89-27@gated-at.bofh.it> (permalink)
References <to6rM-88R-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Mar 23, 2017 at 04:38:38AM -0400, Mark Stenglein wrote:
> Fixes three instances of the following checklist error:
>     - ERROR: Macros with complex values should be enclosed
>       in parentheses
> 
> Simply adds parentheses around the macros to fix the problem.
> 
> Signed-off-by: Mark Stenglein <mark@stengle.in>
> ---
>  drivers/staging/most/mostcore/core.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
> index 191404bc5906..13e65f149d68 100644
> --- a/drivers/staging/most/mostcore/core.c
> +++ b/drivers/staging/most/mostcore/core.c
> @@ -341,8 +341,8 @@ static ssize_t show_channel_starving(struct most_c_obj *c,
>  	return snprintf(buf, PAGE_SIZE, "%d\n", c->is_starving);
>  }
>  
> -#define create_show_channel_attribute(val) \
> -	static MOST_CHNL_ATTR(val, 0444, show_##val, NULL)
> +#define(create_show_channel_attribute(val)          \
> +	static MOST_CHNL_ATTR(val, 0444, show_##val, NULL))

I don't think this does what you think it does.  Did you test build
this???

Please learn C before working on kernel code, the kernel is not a place
to learn it.

thanks,

greg k-h

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] staging: most: Adds parentheses around macros with complex values Mark Stenglein <mark@stengle.in> - 2017-03-23 09:40 +0100
  Re: [PATCH] staging: most: Adds parentheses around macros with  complex values Greg KH <gregkh@linuxfoundation.org> - 2017-03-23 10:10 +0100

csiph-web