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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C81E5C77B7A for ; Wed, 7 Jun 2023 06:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cpchGNz7cHcVwFhZepuTiUL2GA1QzyElI/pzRombwWs=; b=bCas4P/9ZqTA/i T+CtHc8h+O29dPxn4rpMuwIZ6h/kVopOLC0Wzk1caw2/BrmmpxqXVm+IS4iQUqk4GdJKJ/9TolwIe YrO+48WFvGTukOJT1OZOUnT1bRZlEReR40JVXcDZj0F012i72e/n3OrAGf0k6oYAOUKEeuIDE7PBB KNRtnNnC67nRVQF26+tFqVHQM36ruSIL+BhcQe5ydTuHC3oaapTJurdFCvIVq2O88PQLlEhoHKr+L JTNZTMWy49p3+zlVj8Zf2UrGJhDq+jEsYAirBHvxVxDJS39ScxN1cCpCdf1UJPl3OtJy//CB/gBXA ylgOQqdh60hoVfuBJ44A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6mjb-004ZjO-0S; Wed, 07 Jun 2023 06:33:31 +0000 Received: from fgw22-7.mail.saunalahti.fi ([62.142.5.83]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6mjY-004Zhw-0C for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 06:33:29 +0000 Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id 33f50993-04fd-11ee-a9de-005056bdf889; Wed, 07 Jun 2023 09:33:24 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Wed, 7 Jun 2023 09:33:23 +0300 To: Oleksii Moisieiev Cc: "sudeep.holla@arm.com" , Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" Subject: Re: [PATCH v3 1/4] firmware: arm_scmi: Add optional flags to extended names helper Message-ID: References: <2ad06a5582bb31e16fe2f497e15cb41e8455e863.1686063941.git.oleksii_moisieiev@epam.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2ad06a5582bb31e16fe2f497e15cb41e8455e863.1686063941.git.oleksii_moisieiev@epam.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230606_233328_276831_E1CE4DC7 X-CRM114-Status: UNSURE ( 9.02 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Tue, Jun 06, 2023 at 04:22:27PM +0000, Oleksii Moisieiev kirjoitti: > Some recently added SCMI protocols needs an additional flags parameter to > be able to properly configure the command used to query the extended name > of a resource. ... > put_unaligned_le32(res_id, t->tx.buf); > + if (flags) > + put_unaligned_le32(*flags, > + (u8 *)t->tx.buf + sizeof(res_id)); I believe this can be one line, esp. if the buffer is void *, you do not need an explicit casting, void * pointer arithmetics is byte-based (yes, non-standard but very widely used in the kernel). > resp = t->rx.buf; -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel