Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp9440924rwb; Thu, 24 Nov 2022 13:02:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf6okjCqTqmIvMUbaSKYngIvp44EAS/PqhSyMfgdSaM8YugajxOAb6Z8ftNFWUb9gilg3OFy X-Received: by 2002:a65:67c5:0:b0:477:76c0:1d13 with SMTP id b5-20020a6567c5000000b0047776c01d13mr15139384pgs.55.1669323736511; Thu, 24 Nov 2022 13:02:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669323736; cv=none; d=google.com; s=arc-20160816; b=wP2jJxZdpLVz4W2BR2rqNp0FAXnfvZ9S7Y243kDnQe2yLB+15knoqVOjtg1vUJH0kQ XSxYPZlUIZOMJzC9Mk9rTIvSstOcsRDHGv+dcVkt7JZq7WxN/P+maZQ9O1fyF8NHs2wt hrTvWaSt7KNE/o+J/dG2o+vyh/giF5O85bb8dXP0UbQqpcLGnirDoKqvlRqjdwkoqdJC GynM9M0bKY+bu9qH77OGj/i3nNawGxM1jmgxn23En7TiHUbw2ssVEfyttOLGLy8MCgUl mdYsVElHPOymRFiJP8rVWDPrvdM0c2Sox9OyVD0din6lxdrySASFLC79v6QiVCOem2BA eQgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=1OLd5O9kBVnOc1pn5jraU0d1HmuQ6cO+WsefK5ZCIqg=; b=o30Uh+6o9HHYTmZ9QSiUHUt38fqUfSQuJnc+vrkmOa1ekHOh05H/y+Mzv+28mGpEBn vqeAcZGs3VHIkb3ickOLAxkJtLN30p2kloCFXGQOpHDoTdkyKatK30g4YIS1QAF9T7ol FQtd9BCYMx5xD2DvDXrKejnjqXR99rDnHCIh+Uh4vsKjiPlx7is7aO7VoE51sdLle1N0 wMk448KCtQLNh5u0PPLcS5MzHKXL5AW8i7IjRLjMEBw8Rj22j3iU+AhcWgmeKFeonA+q Gi36cG90fj2LRKpFVGhpmWTzKwCMa6zuXCuBllb3x95OTEeIcUW15RZ2Gz7SCSCGdGP1 RNyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P3nMtMWl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a23-20020a62bd17000000b00571d38602bcsi1681604pff.295.2022.11.24.13.02.05; Thu, 24 Nov 2022 13:02:16 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P3nMtMWl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbiKXUIa (ORCPT + 87 others); Thu, 24 Nov 2022 15:08:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiKXUI2 (ORCPT ); Thu, 24 Nov 2022 15:08:28 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C00D356553; Thu, 24 Nov 2022 12:08:26 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F3C04B828DB; Thu, 24 Nov 2022 20:08:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 574CCC433C1; Thu, 24 Nov 2022 20:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669320503; bh=AqLjRFqgqFhAgmvM5lie1bZYceUKkJ7UwUOqCB9iVZc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=P3nMtMWlZuX5SPCqYo2kFm+B0/R9GR4ITfmHWgL233xsH9u+2PvPwumnn2cjhzx1m HYFG4vLV+fviFu2mEbWxIAiK+Jfea0OMphXT5Ydq/LVCFMYqd2QOH7ZdXCO0OjWzHn lZCFQ6xtJQU6uJvEnYmq89DM1183CtuA79vWRQroo5QqpEPFWRL4BzXVVVtAYBrrp1 UMpTUtb340YKML8G+exn5jMZ6EP5KJt3pLz9PbVdUV0cq9A2SrcHBi4yZKJ0b6zh5D XuAtgM+LvXhgTnlRTDbJnr6jAU8Q24fANiB3gFPvnCMT57u0tNtVSfQ2HbRbFmXlFl aL/yUGKs1mb9w== Message-ID: <59aea5e5-25f1-de8c-9982-5db226f8bda5@kernel.org> Date: Thu, 24 Nov 2022 20:08:17 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v4 1/7] riscv: asm: alternative-macros: Introduce ALTERNATIVE_3() macro To: Conor Dooley , =?UTF-8?Q?Heiko_St=c3=bcbner?= Cc: Prabhakar , Paul Walmsley , Palmer Dabbelt , Albert Ou , Geert Uytterhoeven , Magnus Damm , Rob Herring , Krzysztof Kozlowski , Guo Ren , Jisheng Zhang , Atish Patra , Anup Patel , Andrew Jones , Nathan Chancellor , Philipp Tomsich , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Biju Das , Lad Prabhakar References: <20221124172207.153718-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20221124172207.153718-2-prabhakar.mahadev-lad.rj@bp.renesas.com> <4801607.MHq7AAxBmi@diego> Content-Language: en-US From: Conor Dooley In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On 24/11/2022 20:05, Conor Dooley wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On Thu, Nov 24, 2022 at 08:58:41PM +0100, Heiko Stübner wrote: >> Am Donnerstag, 24. November 2022, 20:52:33 CET schrieb Conor Dooley: >>> On Thu, Nov 24, 2022 at 05:22:01PM +0000, Prabhakar wrote: >>>> From: Lad Prabhakar >>>> >>>> Introduce ALTERNATIVE_3() macro. >>> >>> Bit perfunctory I think! There's a lovely comment down below that would >>> make for a better commit message if you were to yoink it. >>> Content looks about what I'd expect to see though. >> >> Also both the comment on the original ALTERNATIVE_2 and the new ALTERNATIVE_3 >> should probably be merged into a single comment explaining this once for all >> ALTERNATIVE_x variants. >> >> Especially with the dma stuff, I'm pretty sure we'll get at least an ALTERNATIVE_4 >> if not even more ;-) . So we defnitly don't want to repeat this multiple times. > > Oh I can promise you that there'll be a #4 ;) I do find the comment's > wording to be quite odd though.. > >> + * A vendor wants to replace an old_content, but another vendor has used >> + * ALTERNATIVE_2() to patch its customized content at the same location. In > > In particular this bit about "at the same location" does not make all > that much sense. What "at the same location" means in this context > should be expanded on imo. Effectively it boils down to someone else is > already replacing the same things you want to replace - it's just the > word "location" that might make sense if you're an old hand but not > otherwise? Or maybe I am just biased because I tried to explain this to someone recently and the language in the comments didn't make sense to them, and anyone meddling with this code should be able to understand it? >> + * this case, this vendor can create a new macro ALTERNATIVE_3() based > > Also, using the word "can". Is it not a "must" rather than a "can", > since this stuff needs to be multiplatform? > >> + * on the following sample code and then replace ALTERNATIVE_2() with >> + * ALTERNATIVE_3() to append its customized content. > >