From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754552AbdCWJAc (ORCPT ); Thu, 23 Mar 2017 05:00:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47718 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506AbdCWJAa (ORCPT ); Thu, 23 Mar 2017 05:00:30 -0400 Date: Thu, 23 Mar 2017 09:59:24 +0100 From: Greg KH To: Mark Stenglein Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: most: Adds parentheses around macros with complex values Message-ID: <20170323085924.GA19222@kroah.com> References: <20170323083838.29565-1-mark@stengle.in> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170323083838.29565-1-mark@stengle.in> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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