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=-10.0 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 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 12003C433E3 for ; Wed, 22 Jul 2020 10:01:10 +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 D2D6C2065E for ; Wed, 22 Jul 2020 10:01:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="omHo6AgH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aibQhxI7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2D6C2065E 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-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:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=h4/kMkBJmdZRoi7PLE6sGHUcr+W9BAdWp/5P1ZKn4mw=; b=omHo6AgHMJiWmwIDSuG98iq+k xglHOzE9M053bp98T6D/4Ip21EoRTn+0PtTLps2MIP4ay3WnYS3CbU7oIaGG+vCaOFgCi+HtMUspM V1nHUBHjTLC5zbGlXy5I9qzzAbyWTA7nX79U5wpv7pgZivKgEvN/r8QWxliwGAXkyGRhbLDa6/Koi hNok44sUY6+2HEUhnClBl2+Y4HIMa30AGFGFPvhdRYniy61t2V0ZfcSBzLs/8YP+7cyPOwy0bCD7y vaXwH2L/ZvZOppC41pEcKPnfgIqcVIfxOcOtDBOk0O08F9kNelobfCIdY8RhahGnglpD1JU0z7NFJ ZsCu2dQ8A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyBWp-0008Gp-94; Wed, 22 Jul 2020 09:59:11 +0000 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120] helo=us-smtp-1.mimecast.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyBVz-0007zG-DS for linux-arm-kernel@lists.infradead.org; Wed, 22 Jul 2020 09:58:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595411898; h=from:from: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=iSrwXo8z6oR7WAJ09sJwJyB/yvM/GAEP/D4z67rnOU0=; b=aibQhxI7WjYflSu5akCgpbokeNBF5npVRe1/ou1a7qMmCZzw80kiJ8Y4vUb3gGf2Ip2VbT czLIRAcTNgtdbT24qOPrB4OQWsSbeuwrhz6uJOucqRORXa9Yeu/Q6bfU05uInQIGru9imq 04GcjlPrroIE+e8jKYuD+FT/x2R30CA= 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-231-9Q8yDztmOo-inlPi5Sb_ng-1; Wed, 22 Jul 2020 05:58:16 -0400 X-MC-Unique: 9Q8yDztmOo-inlPi5Sb_ng-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F9A8107ACCA; Wed, 22 Jul 2020 09:58:15 +0000 (UTC) Received: from localhost.localdomain.com (vpn2-54-170.bne.redhat.com [10.64.54.170]) by smtp.corp.redhat.com (Postfix) with ESMTP id F254A5D9CA; Wed, 22 Jul 2020 09:58:12 +0000 (UTC) From: Gavin Shan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 10/17] drivers/firmware/sdei: Cleanup on cross call function Date: Wed, 22 Jul 2020 19:57:33 +1000 Message-Id: <20200722095740.28560-11-gshan@redhat.com> In-Reply-To: <20200722095740.28560-1-gshan@redhat.com> References: <20200722095740.28560-1-gshan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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-20200722_055819_558557_34FE3E8D X-CRM114-Status: GOOD ( 11.99 ) 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, will@kernel.org, james.morse@arm.com, shan.gavin@gmail.com, catalin.marinas@arm.com 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 This applies cleanup on the corss call functions, no functional changes is introduced: * Cleanup struct sdei_crosscall_arg to use tab between fields and their types * Refactor CROSSCALL_INIT to use "do { ... } while (0)" to be compatible with scripts/checkpatch.pl * Remove unnecessary space before @event in sdei_do_cross_call() 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) { -- 2.23.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel