Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4171039rwl; Mon, 3 Apr 2023 00:31:57 -0700 (PDT) X-Google-Smtp-Source: AKy350b/wMYbc5ccjWncEp6I6BLr9L6AxfbN+bX64mUFvAtYLfVP6+pdtfN6x4ajFC/ZMfSfdCNH X-Received: by 2002:a17:906:d97:b0:8b1:2c37:ae97 with SMTP id m23-20020a1709060d9700b008b12c37ae97mr36426665eji.43.1680507116910; Mon, 03 Apr 2023 00:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680507116; cv=none; d=google.com; s=arc-20160816; b=FvYfRg6rTx2MXs2L4KH10P4MPDshWGaygC/0Xuc3hUrnJPJakPqJh9WVH747WK8DV7 vQF7l1IFzMtNzqVEOU8VkKrf0HavtcUrPcpDb68MCCjwTezii6I0qMVGN2S2ad2AL8am MG/f5VgD0FKOBVZEmXsMWNhY6bFfDHuuLZ5qQvBF1+JmVE5pWXRGCrZHQNUm3uI+dOKt 2EgKOua5etdW5T7gUZTBKx0g+g56tEaZ5SP/dilMBaSF59x+k0HkeXfxj/qjpJwxkata gqG3uXK/I0dzvvqf/g4uDr5acQPExUzs38BL7UB5YgXowV0YsPe1JmlS9ovP7/DSbSgw Ei5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=I8he2StMC+upILflmcANsszDfsviMhhMkt970MoNmLc=; b=iFM5QgnxysGe0KPibbg8ejij9QNnSGv3Q8hL9+mFUWViyElXB4P5qToOsjMHcRGsbj iuUy8m6N8HtOnjLA6qOrKe6X0MkOQO3oPmVAsSWqEMlU+xvroy1EJ1Zi3vqHlk8SrenG vN5CSP2n9Ap0PKYjmizGl7HIdj2ZlHdngLMIoGG+Vpa6arI3PZ2v2v+hw+ofRle5vLsb Qxeyva9kEykmQVATZ0oYlLuy44nkDnjqohmh5981pvcu8E63+1tmfJyTQMDtbOkvfDM6 GAh8dhkC3IhrzF8p3smB82CJRxqJrCOBKplvtygr6neAyjFzFNoFSwqkRCWFxC/y+cKc Nqeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=caWhFVlx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg20-20020a170907971400b00947f4e2c36asi5609133ejc.760.2023.04.03.00.31.32; Mon, 03 Apr 2023 00:31:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=caWhFVlx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231245AbjDCHV4 (ORCPT + 99 others); Mon, 3 Apr 2023 03:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbjDCHVz (ORCPT ); Mon, 3 Apr 2023 03:21:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BA365FFA for ; Mon, 3 Apr 2023 00:21:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 30F27B811E3 for ; Mon, 3 Apr 2023 07:21:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EBAAC433EF; Mon, 3 Apr 2023 07:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680506510; bh=jYYQrfyfwF4ldZBvYJGRWqLHFtgAgWU3/+bwdD3kqFc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=caWhFVlxmWNdQ+ehy3O/F3pmSuUCMvdKU0utT4GFdZr+4GMnUuhO2MHzqXTHEnNmx lfVeFe9z8gGs1B9N44zRgZIZ7xyO+CAPxgR+9qW0qeBxva4TreNP7ObhME6JemTd8i zK1CI7NAQFk2fAyE4HV2I3U++OpE8uUJO18uPVRE= Date: Mon, 3 Apr 2023 09:21:48 +0200 From: Greg Kroah-Hartman To: Dan Carpenter Cc: =?iso-8859-1?Q?=C1ngel?= Alberto Carretero , Bryan O'Donoghue , Johan Hovold , Alex Elder , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: greybus: loopback: fix up checkpath macro do while error. Message-ID: <2023040301-tapping-umbilical-f7b4@gregkh> References: <20230402122550.70682-1-angelalbertoc.r@gmail.com> <2023040252-racoon-daintily-3589@gregkh> <0af15115-9641-a1c8-f398-c4e8e77379a3@gmail.com> <2cb170e2-3551-4f2a-9cd3-065d9bd4504b@kili.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2cb170e2-3551-4f2a-9cd3-065d9bd4504b@kili.mountain> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 03, 2023 at 09:23:55AM +0300, Dan Carpenter wrote: > On Sun, Apr 02, 2023 at 08:22:35PM +0200, ?ngel Alberto Carretero wrote: > > > > > > On 02/04/2023 15:16, Greg Kroah-Hartman wrote: > > > On Sun, Apr 02, 2023 at 02:25:51PM +0200, Angel Alberto Carretero wrote: > > > > Wrap macro in a do-while statement. > > > > > > > > Signed-off-by: Angel Alberto Carretero > > > > --- > > > > drivers/staging/greybus/loopback.c | 8 +++++--- > > > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c > > > > index d7b39f3bb652..371809770ed0 100644 > > > > --- a/drivers/staging/greybus/loopback.c > > > > +++ b/drivers/staging/greybus/loopback.c > > > > @@ -162,9 +162,11 @@ static ssize_t name##_avg_show(struct device *dev, \ > > > > static DEVICE_ATTR_RO(name##_avg) > > > > #define gb_loopback_stats_attrs(field) \ > > > > - gb_loopback_ro_stats_attr(field, min, u); \ > > > > - gb_loopback_ro_stats_attr(field, max, u); \ > > > > - gb_loopback_ro_avg_attr(field) > > > > + do { \ > > > > + gb_loopback_ro_stats_attr(field, min, u); \ > > > > + gb_loopback_ro_stats_attr(field, max, u); \ > > > > + gb_loopback_ro_avg_attr(field); \ > > > > + } while (0) > > > > #define gb_loopback_attr(field, type) \ > > > > static ssize_t field##_show(struct device *dev, \ > > > > -- > > > > 2.40.0 > > > > > > > > > > > > > > Any specific reason why you did not test build your change before > > > submitting it? > > > > > > thanks, > > > > > > greg k-h > > > > Apologies, we can drop the patch. I was trying to find an error as part > > of the eudyptula challenge and thought I was compiling the driver > > correctly. Upon further examination, the macro cannot be written with a > > do-while because it is defining functions. > > The "eudyptula challenge" and other first patch guides should be updated > to tell people to search for their code on lore.kernel.org before > sending a patch. The "eudyptula challenge" is not currently running and has not been for many years now so I do not know where the original poster got their information from. thanks, greg k-h