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=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 EC33FC433E4 for ; Mon, 27 Jul 2020 09:46:50 +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 BAEFE206D7 for ; Mon, 27 Jul 2020 09:46:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XDKtOO5t"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BkY2LV+Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAEFE206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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-Type: Content-Transfer-Encoding:Cc:Reply-To:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rmouw5ZQ6UMsjOGNcWf5Gk5f7iHEAUFOrL+fJv4Of/o=; b=XDKtOO5tdgRQYG vufR8EU/kz4D6iWSguAz1d4vVV+M5Mv647CqLWOrQ2dP1SAYXtAEyKTy7ycy0RufkP3hYhzWhhxYa sokMR6dUOa+8ZDAyRTXUNDBLqMpO07U8lgEDNd39sj9jkpK8Ho4/3vNyqvTym0ERo5fGNfmaVdR7M dLGT4whEQgVzi5b3ID9VTqtnQuYx5+68KUvRVpHWgP4gThWE8Q5duvLIOBNDEFqjsoumwFjJ+iSu8 jHnCVfSgW5+WAmw+vdah9wruBEIA8gNiGwvLYpd3cPV4wgMfmwHflTcBXfrXcDTtjmqT9gZN8rqXV bi3vhg5kwCBiOOjdLeVA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzzhF-0004e1-1K; Mon, 27 Jul 2020 09:45:25 +0000 Received: from us-smtp-1.mimecast.com ([205.139.110.61] helo=us-smtp-delivery-1.mimecast.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzzhB-0004dH-HO for linux-arm-kernel@lists.infradead.org; Mon, 27 Jul 2020 09:45:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595843121; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wsLZcE8TYy2fVkvRQJ+nlvDO2fz/6+KgdjetWrtzJ9U=; b=BkY2LV+QE6DBhXd77QfgOlkig/R1ASRIIw1qRPI+5c2n8HZllRKIecF2YX7IhwSmJVz4He cPdAtrgs2FMo0kMkCV6AMpTNc98+wLCW0xUzOYPihV0ja8DiU+GeiUElpuw7ABfYSMDXCg mVK3EOBFrsXfQPRCaLPAUQVsg0nPCJI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-120-Ax38IkmjNh-efj-Io8nHlw-1; Mon, 27 Jul 2020 05:45:18 -0400 X-MC-Unique: Ax38IkmjNh-efj-Io8nHlw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 13731800688; Mon, 27 Jul 2020 09:45:16 +0000 (UTC) Received: from [10.64.54.117] (vpn2-54-117.bne.redhat.com [10.64.54.117]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E385712CF; Mon, 27 Jul 2020 09:45:13 +0000 (UTC) Subject: Re: [PATCH v2 10/17] drivers/firmware/sdei: Cleanup on cross call function To: Jonathan Cameron References: <20200722095740.28560-1-gshan@redhat.com> <20200722095740.28560-11-gshan@redhat.com> <20200723165222.0000770e@Huawei.com> <20200727095821.00003e39@Huawei.com> From: Gavin Shan Message-ID: <9857062a-d1e4-0e3b-ec86-e78abd1612ba@redhat.com> Date: Mon, 27 Jul 2020 19:45:11 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20200727095821.00003e39@Huawei.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=gshan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200727_054521_836519_BB3E824B X-CRM114-Status: GOOD ( 22.25 ) 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: , Reply-To: Gavin Shan 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Jonathan, On 7/27/20 6:58 PM, Jonathan Cameron wrote: > On Mon, 27 Jul 2020 10:33:46 +1000 > Gavin Shan wrote: >> 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. > I will drop the particular changes in v3 then :) >> >> # 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