Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp312438rwd; Tue, 6 Jun 2023 23:45:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kxkVZ52YzBA2mRJ+DkBB7jgGfysuTN4D7oHvsjK8cVfhHK/PemzRV6rUmOKh7XT8NeX9u X-Received: by 2002:a05:6870:8227:b0:195:f440:40fa with SMTP id n39-20020a056870822700b00195f44040famr4051670oae.41.1686120314190; Tue, 06 Jun 2023 23:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686120314; cv=none; d=google.com; s=arc-20160816; b=AnSBabDU+1C73G0JX+9IdcmOIu+O29PkBUSaMv5xpwHvEpdS8iiy5E9X+CXNm4trBZ 1mm5ZVB0fSBbMJ/VC6RVs7BAHZv4aX6DMmXh+giPJ93AdqVWZo5td2gSQQmIyEmWsrTZ t8eX0g7PXKIEIokUIv1zlLNx8aQIkEr7XB2FfR/JhHzO9U5Z+LRPf8rQJlWRV8cwn3iC QrDwqOui+LLer6CmqH4FSkY1+bnidHupjSb7k42v/jtz4Z9Ey1driD2SeCAZrK8dWgzp LyjBHq0yy4/DZdDF3ejyy7oXoX8qJ/2mcrWlapVd4vndcYI5CwTAoddRspVF2F2jwy03 Lypg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=oRHcS8xaPCqVcUGJFA6EsavTv7Zjhem/cFBvPlUCg14=; b=T3oTUPB8GYf5WFaGgF073f3BqT72FbebWxS6ntA9gsUQK8V8fe3KWI4JvWn600YQSx bhWaIZNnhyWp6sePELVOowRoEweawVbh1OvSiQv6cYsOCXXmxMmRMqZBAi3BYQ9xvqeo y8XGSRtzbyAd1cAjfezMcDCqx8uYzXiw/Q3y/n5cH8jyKbvRrzRe1niXi6af/4NmEcKh Gw0QNJjsA4Q/D8K6HNWTczpHMetXarwiClg72B5V4CZ/QFnVFGccN7bG3986t/+UWKHE xSxseXCrDsNOnVQ0frKIwjAVxgEFCe/wGe7ZvyyOjrdexgBd74Y6GiE2Ep71qvDzytqb ZXwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a30-20020a63705e000000b0054290a07fbbsi8425547pgn.324.2023.06.06.23.44.59; Tue, 06 Jun 2023 23:45:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237189AbjFGGe2 (ORCPT + 99 others); Wed, 7 Jun 2023 02:34:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237056AbjFGGd4 (ORCPT ); Wed, 7 Jun 2023 02:33:56 -0400 Received: from fgw22-7.mail.saunalahti.fi (fgw22-7.mail.saunalahti.fi [62.142.5.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B327811D for ; Tue, 6 Jun 2023 23:33:26 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ad06a5582bb31e16fe2f497e15cb41e8455e863.1686063941.git.oleksii_moisieiev@epam.com> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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