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=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 6278EC433E0 for ; Wed, 22 Jul 2020 02:40:31 +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 2F08C2063A for ; Wed, 22 Jul 2020 02:40:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ovKmlVOX"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NihVN6sa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F08C2063A 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=hZQ3PMLhHiAWFz5QF77qSTLCDIKY8+d9Fxr0Re2QOLM=; b=ovKmlVOXvf13Kt g5PHBin1v8xaq6esCXKiC/tF+MCEdJ0jtehFTT/R2dKL2mikH9hcYc5Q+9cmMOA5p8Cb2QlDf1ERh 1GFeoCwNESD1ksmrPUaD1Iayg63//aP5dSemiCuHPJKRIbMRY7egS2+M4Gn+N137WlQ/jxdrmIo4W cNalN049jlvg12LH2kaFrcZzZbvYw0BWvlwPBqH6FdJ828RvZx/cpnj511Vc9oOtSQs83WUUHEiRa friqfwd1PrzIPDkUcMY8YZ2rj0GNUaRQKpGzawsBiIR5a+bZNgvU2c4FfkxNCGqbgVs2lYLXcAuOv lDln2tom2R2HRRYVfPVg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jy4er-0001MH-CG; Wed, 22 Jul 2020 02:39:01 +0000 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120] helo=us-smtp-1.mimecast.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jy4eo-0001Le-Mz for linux-arm-kernel@lists.infradead.org; Wed, 22 Jul 2020 02:38:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595385538; 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=V3jJ6/w/uD5m9drngD74luUfNAOESuolKrBeyjqx5zE=; b=NihVN6sadPd4ZlO5Fvq9ovn/9YFuHRh6+YNvFgCj4ItnmwoZUGkAilWPH8F78zI8T/SSc/ Y/vIH5Rc4TmCFGKOqGu1rjUTaX1hBP4ao5gkG4+E1Ab13Uu3zV8s0zAKdDZfFL4zb/YAqD 5I/uEqsqrep7mhX/uj7AQ/+8mEW/riM= 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-254-tj8WD-XQOvS4pdArwmdaSA-1; Tue, 21 Jul 2020 22:38:56 -0400 X-MC-Unique: tj8WD-XQOvS4pdArwmdaSA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E037758; Wed, 22 Jul 2020 02:38:54 +0000 (UTC) Received: from localhost.localdomain (vpn2-54-170.bne.redhat.com [10.64.54.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF13C7269B; Wed, 22 Jul 2020 02:38:52 +0000 (UTC) Subject: Re: [PATCH 03/14] drivers/firmware/sdei: Dereference SDEI event parameter directly To: James Morse References: <20200706054732.99387-1-gshan@redhat.com> <20200706054732.99387-4-gshan@redhat.com> <9fcd103a-18ac-c3e5-8df5-c1ad425f000a@arm.com> From: Gavin Shan Message-ID: Date: Wed, 22 Jul 2020 12:38:50 +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: <9fcd103a-18ac-c3e5-8df5-c1ad425f000a@arm.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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-20200721_223858_820016_2EDB9C94 X-CRM114-Status: GOOD ( 18.73 ) 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, will@kernel.org, shan.gavin@gmail.com, 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 James, On 7/22/20 6:41 AM, James Morse wrote: > On 06/07/2020 06:47, Gavin Shan wrote: >> The SDEI parameter is dereferenced by @sdei_event->registered or >> @sdei_event->private_registered, depending on the event type. > >> They >> can be dereferenced directly so that the intermediate variable >> (@regs) can be removed. > > Unless its there to make it obvious that the shared/private blocks of this are doing the > same work. > > >> It makes the code looks a bit simplified. > > I disagree. > Well, @regs can be removed and the scope of @reg is narrowed. However, it might be not worthy for the effort. I will drop this part of changes in v2. > >> Also, @event->event_num instead of @event_num is used for retrieving >> the event number for the shared event, which makes the code similar >> to the case of private event. > > Sure, this is an an inconsistency that could be changed. But I don't think its worth the > effort! > Yes, but I think it's still worthy to make the code consistent. Lets keep this change in v2 only. All other changes will be dropped. > >> Besides, the local scoped variables >> are reordered according to their importance by the way. > > Please: never do this. > Sure. Thanks, Gavin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel