Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp9406529rwb; Thu, 24 Nov 2022 12:22:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf6RT1cc1zdGuBYQYhJ3LYZDjJoE5Ose5tKElQ8p/739/mZFtD75piCzhdO6FZt2jj9qB0/c X-Received: by 2002:a05:6a02:20a:b0:477:cce0:28f8 with SMTP id bh10-20020a056a02020a00b00477cce028f8mr4217374pgb.89.1669321345494; Thu, 24 Nov 2022 12:22:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669321345; cv=none; d=google.com; s=arc-20160816; b=OCdoX4VMmjJ9PwAuk0U1CV6l2UIHWCQFDSEIOmBm2zotzHCQ6NYdRDWWb/uza5BQuK BLpLuJpzVThQ/T0YgPLoRrhWtbFEupAu5xov7Kcot2p7KQ+QdMPAI2HlnOrIW1PD2V8K IHNphqOgKMbrOySPl9yEjBKxcwCn32hBvH4mP3aniGORhL4YnLvNGC/t2JzeXOEsNb8I LpCqzi3MPWtcd2cmBti+1WldIneExhIw3iPc3zSKgCbZ2EtKp7a1TicXWDHMAVKX0Kds NFsFMqF9AVsPoiOc1B1yWxgHFaWr9gKZ6JE53SyrnPYZnShLBbm9gfX56KuqR8gkVZ2W SdRw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x9A+ZZziHsRSabbuKV3t3cMqlLsrIIYdTxI7dECo5o4=; b=oxHvphPX94vHHjNx16mKOjnhRFupBi4PL5MntjJ4redUC0NR+DM3MGyejiOMiUhHBS zmcFqblB7LdwRqpCMUa6uVJjy3AUeWu6F3DWuQqMzOyB//tnJkhsP1hyKf40p6RhMAI0 RMHeVZM1N2SrUUrd8ZbAgJTWPSl6eJwEAe8305htvCdvcsTEIis5hPUbOZzeg0pFgmo7 5+IwPPI4/zRvWe5TT9qw+GL8z31tj9NXbLbvE/XozaJtwwrweSPFMBXznP54vEwobOeC iKcEikRdyjRHHuSRGjxbsPPHENdPgfRpYrhffmg64ok15v6tQ41H9EfWPB9DE9Zgtwlk R6kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f9PIyi1b; 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 r76-20020a632b4f000000b00477b463b049si2183147pgr.491.2022.11.24.12.22.10; Thu, 24 Nov 2022 12:22:25 -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=f9PIyi1b; 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 S229504AbiKXUF4 (ORCPT + 89 others); Thu, 24 Nov 2022 15:05:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiKXUFx (ORCPT ); Thu, 24 Nov 2022 15:05:53 -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 D98B16CE4F; Thu, 24 Nov 2022 12:05:52 -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 8752EB82756; Thu, 24 Nov 2022 20:05:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A56BC433D7; Thu, 24 Nov 2022 20:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669320350; bh=f8Kaz8pUEg/+dRz3JXsCoWQ/hDv43xbv8M6GJX2jTMQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f9PIyi1b28nJcBVnbuB52YKFjX9SgXxrw/smc+QNBcHKHwpDR0exAb/cuFUCBr9CQ MwCHQnRO9ji2xHo6iJuFh0pSygN9gg7YkB0KGwiaX2XgVLPCO63PD3k/ygS4kAMvgg EpWwmr4ABoTnMwLExgMauElADrxobvRX+7F+ziAjdRYOY1E/2xXiBX02CxJ63jdVta QPWLG4PjEb9Td+S6E/payr/UPALGtERLV60ckexfjm9j2yRNPLuc9NE1AJOCJCOd1E 2zfZ884cqIbqZMVraME45p1jw/abfNa4Py1/mM1ObtSm5d/ULhLMkcLx20f6qWzulP APCR+icwPFKqA== Date: Thu, 24 Nov 2022 20:05:40 +0000 From: Conor Dooley To: Heiko =?iso-8859-1?Q?St=FCbner?= Cc: Prabhakar , Paul Walmsley , Palmer Dabbelt , Albert Ou , Geert Uytterhoeven , Magnus Damm , Rob Herring , Krzysztof Kozlowski , Conor Dooley , 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 Subject: Re: [PATCH v4 1/7] riscv: asm: alternative-macros: Introduce ALTERNATIVE_3() macro Message-ID: References: <20221124172207.153718-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20221124172207.153718-2-prabhakar.mahadev-lad.rj@bp.renesas.com> <4801607.MHq7AAxBmi@diego> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4801607.MHq7AAxBmi@diego> 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,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 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? > + * 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.