Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2613C6FD1F for ; Sun, 19 Mar 2023 11:46:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbjCSLqr (ORCPT ); Sun, 19 Mar 2023 07:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbjCSLqp (ORCPT ); Sun, 19 Mar 2023 07:46:45 -0400 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8A7919116 for ; Sun, 19 Mar 2023 04:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=1IZ/KAw5saCbQvg06OT7S25vtZZN9V8w6z1PpAAdwxc=; b=KEtefP0PNcPwq6E4Xc+0+EplzDXLqBzyHWTGunZyFXUPMQgB1noFZhYN tQmHHISy8FVu4FBYovEGleWX+PGdQhtYckggzdwh8t0pk3jHObWi+Nt5m yNLxK+V/XkmYyEZkFE9Msnbpdv6mFOPr1USw788p888LYAwQa74cNeO/l s=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.98,273,1673910000"; d="scan'208";a="50605869" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2023 12:46:42 +0100 Date: Sun, 19 Mar 2023 12:46:41 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Menna Mahmoud cc: gregkh@linuxfoundation.org, outreachy@lists.linux.dev, johan@kernel.org, elder@kernel.org, greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH] staging: greybus: add blank line after struct In-Reply-To: <6cc1e2f7-e971-b195-acba-9b4c136aa16b@gmail.com> Message-ID: References: <20230319110831.39931-1-eng.mennamahmoud.mm@gmail.com> <15e81411-e40f-43c5-bb7f-907d6d5f93c5@gmail.com> <6cc1e2f7-e971-b195-acba-9b4c136aa16b@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-996529056-1679226402=:2867" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-996529056-1679226402=:2867 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Sun, 19 Mar 2023, Menna Mahmoud wrote: > > On ١٩/٣/٢٠٢٣ ١٣:٣٦, Julia Lawall wrote: > > > > On Sun, 19 Mar 2023, Menna Mahmoud wrote: > > > > > On ١٩/٣/٢٠٢٣ ١٣:١٩, Julia Lawall wrote: > > > > On Sun, 19 Mar 2023, Menna Mahmoud wrote: > > > > > > > > > add blank line after struct for readability as > > > > The log message should start with a capital letter, so "Add". > > > > > > Okay, I will fix it. > > > > > > > > reported by checkpatch script > > > > "reported by checkpatch" or "reported by the checkpatch script". > > > > The first is more concise, and it doesn't really matter whether > > > > checkpatch > > > > is a script or something else. > > > > > > got it. > > > > > > > > " CHECK: Please use a blank line after function/struct/union/enum > > > > > declarations" > > > > I guess the #define was concatenated to the end of the definition to > > > > show > > > > that it is closely related to the definition. With the #define, it > > > > seems > > > > rather natural, but the better soltution would be to make a static > > > > inline > > > > function in both cases. There would naturally be a blank line before a > > > > function definition as well. > > > > > > got your point, so, should i ignore this? > > Not sure what you mean by ignore. If you rewrite the #define as a > > function, an use the natural placement for a function definition, then the > > checkpatch warning will go away as a side effect. > > > I mean ignore this patch and make another patch with rewrite #define as you > suggested. Yes :) That's fine ("drop" would be better than "ignore"). julia > > > Menna > > > > > julia > > > > > > > > Menna > > > > > > > julia > > > > > > > > > Signed-off-by: Menna Mahmoud > > > > > --- > > > > > drivers/staging/greybus/gbphy.h | 2 ++ > > > > > 1 file changed, 2 insertions(+) > > > > > > > > > > diff --git a/drivers/staging/greybus/gbphy.h > > > > > b/drivers/staging/greybus/gbphy.h > > > > > index d4a225b76338..1de510499480 100644 > > > > > --- a/drivers/staging/greybus/gbphy.h > > > > > +++ b/drivers/staging/greybus/gbphy.h > > > > > @@ -15,6 +15,7 @@ struct gbphy_device { > > > > > struct list_head list; > > > > > struct device dev; > > > > > }; > > > > > + > > > > > #define to_gbphy_dev(d) container_of(d, struct gbphy_device, dev) > > > > > > > > > > static inline void *gb_gbphy_get_data(struct gbphy_device *gdev) > > > > > @@ -43,6 +44,7 @@ struct gbphy_driver { > > > > > > > > > > struct device_driver driver; > > > > > }; > > > > > + > > > > > #define to_gbphy_driver(d) container_of(d, struct gbphy_driver, > > > > > driver) > > > > > > > > > > int gb_gbphy_register_driver(struct gbphy_driver *driver, > > > > > -- > > > > > 2.34.1 > > > > > > > > > > > > > > > > > > > --8323329-996529056-1679226402=:2867--