From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtprelay.hostedemail.com (smtprelay0007.hostedemail.com [216.40.44.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB0D172 for ; Sat, 15 May 2021 08:29:15 +0000 (UTC) Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave03.hostedemail.com (Postfix) with ESMTP id 06A1D182331A0 for ; Fri, 14 May 2021 19:32:49 +0000 (UTC) Received: from omf07.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 40FFD1810DA54; Fri, 14 May 2021 19:32:42 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA id D7010315D74; Fri, 14 May 2021 19:32:40 +0000 (UTC) Message-ID: <89a62ed669547eb989dd008b67165f3d0c9f4265.camel@perches.com> Subject: Re: [PATCH] staging: greybus: fix gb_loopback_stats_attrs definition From: Joe Perches To: Alex Elder , Greg KH , Shreyansh Chouhan Cc: pure.logic@nexus-software.ie, johan@kernel.org, elder@kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Date: Fri, 14 May 2021 12:32:39 -0700 In-Reply-To: <88d7da63-d03c-7fa3-a881-aff8e7b4a618@ieee.org> References: <20210514133039.304760-1-chouhan.shreyansh630@gmail.com> <88d7da63-d03c-7fa3-a881-aff8e7b4a618@ieee.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: D7010315D74 X-Spam-Status: No, score=-1.40 X-Stat-Signature: cwerr3zmihx55crpj6cfhty19yuuzfrx X-Rspamd-Server: rspamout03 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19FMxcCDKW900tDgf5rcwkgG+LUGqTv8gY= X-HE-Tag: 1621020760-252553 On Fri, 2021-05-14 at 13:53 -0500, Alex Elder wrote: > On 5/14/21 10:56 AM, Joe Perches wrote: > > On Fri, 2021-05-14 at 17:30 +0200, Greg KH wrote: > > > On Fri, May 14, 2021 at 08:42:16PM +0530, Shreyansh Chouhan wrote: > > [] > > > > I didn't look at how/where was the macro called and missed a very > > > > obvious error. Now that I have looked at it, the only way I can think of > > > > fixing this is changing the macro to a (inline?) function. Will > > > > that be a desirable change? > > > > > > No, it can't be a function, the code is fine as-is, checkpatch is just a > > > perl script and does not always know what needs to be done. > > > > true. > > > > perhaps better though to rename these declaring macros to start with declare_ > > I don't disagree with your suggestion, but it's not clear it > would have prevented submission of the erroneous initial patch > (nor future ones from people who blindly follow checkpatch.pl > suggestions). With my checkpatch maintainer hat on: Yeah Alex, I know. checkpatch can't teach people c either. There's not much to do other than try to make the code clearer. Adding exceptions to checkpatch only leads to other exceptions and false negatives... > PS Lots of negatives in that sentence. Only positives... cheers, Joe From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9B79C433ED for ; Fri, 14 May 2021 19:32:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3D44613D3 for ; Fri, 14 May 2021 19:32:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233044AbhENTd5 (ORCPT ); Fri, 14 May 2021 15:33:57 -0400 Received: from smtprelay0251.hostedemail.com ([216.40.44.251]:36100 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231386AbhENTdy (ORCPT ); Fri, 14 May 2021 15:33:54 -0400 Received: from omf07.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 40FFD1810DA54; Fri, 14 May 2021 19:32:42 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA id D7010315D74; Fri, 14 May 2021 19:32:40 +0000 (UTC) Message-ID: <89a62ed669547eb989dd008b67165f3d0c9f4265.camel@perches.com> Subject: Re: [PATCH] staging: greybus: fix gb_loopback_stats_attrs definition From: Joe Perches To: Alex Elder , Greg KH , Shreyansh Chouhan Cc: pure.logic@nexus-software.ie, johan@kernel.org, elder@kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Date: Fri, 14 May 2021 12:32:39 -0700 In-Reply-To: <88d7da63-d03c-7fa3-a881-aff8e7b4a618@ieee.org> References: <20210514133039.304760-1-chouhan.shreyansh630@gmail.com> <88d7da63-d03c-7fa3-a881-aff8e7b4a618@ieee.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: D7010315D74 X-Stat-Signature: cwerr3zmihx55crpj6cfhty19yuuzfrx X-Rspamd-Server: rspamout03 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19FMxcCDKW900tDgf5rcwkgG+LUGqTv8gY= X-HE-Tag: 1621020760-252553 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-05-14 at 13:53 -0500, Alex Elder wrote: > On 5/14/21 10:56 AM, Joe Perches wrote: > > On Fri, 2021-05-14 at 17:30 +0200, Greg KH wrote: > > > On Fri, May 14, 2021 at 08:42:16PM +0530, Shreyansh Chouhan wrote: > > [] > > > > I didn't look at how/where was the macro called and missed a very > > > > obvious error. Now that I have looked at it, the only way I can think of > > > > fixing this is changing the macro to a (inline?) function. Will > > > > that be a desirable change? > > > > > > No, it can't be a function, the code is fine as-is, checkpatch is just a > > > perl script and does not always know what needs to be done. > > > > true. > > > > perhaps better though to rename these declaring macros to start with declare_ > > I don't disagree with your suggestion, but it's not clear it > would have prevented submission of the erroneous initial patch > (nor future ones from people who blindly follow checkpatch.pl > suggestions). With my checkpatch maintainer hat on: Yeah Alex, I know. checkpatch can't teach people c either. There's not much to do other than try to make the code clearer. Adding exceptions to checkpatch only leads to other exceptions and false negatives... > PS Lots of negatives in that sentence. Only positives... cheers, Joe