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=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable 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 107F3C433E5 for ; Mon, 27 Jul 2020 09:01:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF4542074F for ; Mon, 27 Jul 2020 09:01:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xQ6L5Ujp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF4542074F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=Huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GWzeKgo1LI6LyjDbB0lZTLrLFH+rbYcR0PaPfR+NabU=; b=xQ6L5UjpnCe0C+4dE/isvVjsB +FxwgUfKubl2z1Ao+/kYO3pSB64qc63o4cR/hmyiatvdYt+Hhveeqm6BXlpiQZtV3IX6BK8Kh+ZM7 4cf40B4EQyt+toworiWzTnaWRRy2gGs7KfTYBg61rnq9h2/dy7ZRw2am2BDSZLRQiOYqrUsA8hrTy 5s0vZkLta4yBR5jUbx0I+VyMGrpST73bG7TAar3/XSh8GSqzuB/xar/CPPBGdRD4HyBRgQjdaUSKq m4zSm02zyAHpu9w3SZ8mhOpPMJk5MIxETPg/X5Ps6vwcmMl9XgYHhjFgtxwlKd0XIOOS2lLC9cgdj 0U4TPDobw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzyzB-00047H-3u; Mon, 27 Jul 2020 08:59:53 +0000 Received: from lhrrgout.huawei.com ([185.176.76.210] helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzyz7-000461-Pj for linux-arm-kernel@lists.infradead.org; Mon, 27 Jul 2020 08:59:50 +0000 Received: from lhreml710-chm.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id AD03C39B50BAFADF0080; Mon, 27 Jul 2020 09:59:44 +0100 (IST) Received: from localhost (10.52.121.176) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1913.5; Mon, 27 Jul 2020 09:59:44 +0100 Date: Mon, 27 Jul 2020 09:58:21 +0100 From: Jonathan Cameron To: Gavin Shan Subject: Re: [PATCH v2 10/17] drivers/firmware/sdei: Cleanup on cross call function Message-ID: <20200727095821.00003e39@Huawei.com> In-Reply-To: References: <20200722095740.28560-1-gshan@redhat.com> <20200722095740.28560-11-gshan@redhat.com> <20200723165222.0000770e@Huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.52.121.176] X-ClientProxiedBy: lhreml704-chm.china.huawei.com (10.201.108.53) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200727_045949_951255_C7B2C62C X-CRM114-Status: GOOD ( 27.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, catalin.marinas@arm.com, james.morse@arm.com, shan.gavin@gmail.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 27 Jul 2020 10:33:46 +1000 Gavin Shan wrote: > Hi Jonathan, > > On 7/24/20 1:52 AM, Jonathan Cameron wrote: > > On Wed, 22 Jul 2020 19:57:33 +1000 > > Gavin Shan wrote: > > > >> This applies cleanup on the corss call functions, no functional > > > > cross > > > > It will be fixed in v3. > > >> changes is introduced: > > > > changes are introduced: > > > > It will be fixed in v3. > > >> > >> * Cleanup struct sdei_crosscall_arg to use tab between fields > >> and their types > > Hmm. I guess there is a consistency argument for doing this but generally > > that one doesn't look like it actually has much benefit. > > > > Sorry, I guess you're talking about "./scripts/cleanpatch"? As stated > in the head of the script, the result would be destructive. So I think > manual changes would be more reliable. Lets keep this in v3 if you agree. > > Extracted from "scripts/cleanpatch": No I was talking about doing this change at all. Generally I'd say don't bother making changes like this to existing code. They just add noise. > > # Clean a patch file -- or directory of patch files -- of stealth whitespace. > # WARNING: this can be a highly destructive operation. Use with caution. > # > > > >> * Refactor CROSSCALL_INIT to use "do { ... } while (0)" to be > >> compatible with scripts/checkpatch.pl > > Good to tidy that up. > > > > Thanks. > > >> * Remove unnecessary space before @event in sdei_do_cross_call() > > > > Good change, but seems to have gotten lost in this patch. > > > > Thanks. > > >> > >> Signed-off-by: Gavin Shan > >> --- > >> v2: Drop changes to sdei_cross_call_return() > >> Remove unnecessary space before @event in sdei_do_cross_call() > >> --- > >> drivers/firmware/arm_sdei.c | 15 +++++++++------ > >> 1 file changed, 9 insertions(+), 6 deletions(-) > >> > >> diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c > >> index d03371161aaf..04dc144a8f31 100644 > >> --- a/drivers/firmware/arm_sdei.c > >> +++ b/drivers/firmware/arm_sdei.c > >> @@ -73,14 +73,17 @@ static LIST_HEAD(sdei_list); > >> > >> /* Private events are registered/enabled via IPI passing one of these */ > >> struct sdei_crosscall_args { > >> - struct sdei_event *event; > >> - atomic_t errors; > >> - int first_error; > >> + struct sdei_event *event; > >> + atomic_t errors; > >> + int first_error; > >> }; > >> > >> -#define CROSSCALL_INIT(arg, event) (arg.event = event, \ > >> - arg.first_error = 0, \ > >> - atomic_set(&arg.errors, 0)) > >> +#define CROSSCALL_INIT(arg, event) \ > >> + do { \ > >> + arg.event = event; \ > >> + arg.first_error = 0; \ > >> + atomic_set(&arg.errors, 0); \ > >> + } while (0) > >> > >> static inline int sdei_do_cross_call(void *fn, struct sdei_event * event) > >> { > > > > Thanks, > Gavin > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel