Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1874867rdb; Tue, 20 Feb 2024 09:25:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXyXLm4GuICgwE42EGt+6qbO9cxOy+60CXefbzFsqqFGpcMl77oc9K4GWmyzKnvRT2OYgLWjav0YHtBMYrOqPzeXU8EKBrGOhSk/ZIcVg== X-Google-Smtp-Source: AGHT+IGpvjn8hnFaLgCKuSmSJyqIQBpcbDFdbfDNO7kD0Bv4kM0g/rEj+2YWOS2QA6cGf24Vj5Ud X-Received: by 2002:a05:6402:148d:b0:564:901b:edee with SMTP id e13-20020a056402148d00b00564901bedeemr3729244edv.25.1708449906699; Tue, 20 Feb 2024 09:25:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708449906; cv=pass; d=google.com; s=arc-20160816; b=fiz8faJADXR9lbdYTWpVnL59jZcGT9W+ZVkCkSKMxrTIyj7xN/FrJfs7uMyu+2SHpQ x9S51NStxGG04pWqTYDk6rzVgBUqO17SGcTzzreUSWmZJhWaGxjIdy+YHG/VoMYavBsr GbFZef7e0JA/eFvu3Ph5sXOQO2QJqC6wn25J+BxFIqFUyMkICiPVvyHxkfyFq955b+RG jhzHADTt7/HMb+dAK5p9kuTQd0bweUjWPbqGDPAZgGZ91bi6KIp/pGNvYlB9qnsx/9en K7AWeSv8JdO6UNe/qLOJXTvFyJNx8A6iJLoar+NXM7oHtYhYWMDfw9lu/lLlrjD9xjCP jQUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=ZafUrhkKNKLkalCwFtizcli1lENgBHlsFVfuQ7V0rR4=; fh=VvS/3wpzBWtXeGWzAoODk7k3kFIqs/DHlycSZjyFdzI=; b=DK3l8VdHqGjie3wx9T3cd/EAaJ6oCXOlJS3gzgU1xY4TYNp44VQHM3BPbOHWLKPli5 sw/jKFmLIFc3Qv/U79HhdHoT8eyHxHg85aOqzjxq5bgdHyZoOj2NA+iivak+ChFyTVgO f0cmz+JmYWqy4GQpgl8SyQ6PJb0AUG6Oe+lLQnuRfZ2B2IJ3mnVaR5Y6a92PmHfLzro0 fmEOpm8/H58VBEmjRhUld0DRmxYedvEs+XFf43JyIKiAdgFeMBkIqpmw9ZrZQB7Dij8R j2fhulE5yOG/JiApA0U6HMgjPnmB2nSAihwC81EiNGPbTKLEc/7IBdPyYbwlqFtDNxGM tHfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-73436-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73436-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cw4-20020a056402228400b00563f58848e3si3533807edb.125.2024.02.20.09.25.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 09:25:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73436-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=alpha.franken.de); spf=pass (google.com: domain of linux-kernel+bounces-73436-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73436-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3B4691F21BEB for ; Tue, 20 Feb 2024 17:25:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E8BB77639; Tue, 20 Feb 2024 17:24:50 +0000 (UTC) Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36F10768FF; Tue, 20 Feb 2024 17:24:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.175.24.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708449889; cv=none; b=upMzPjS1AAFQoGp6c2ZkwFIYKjLdL3PJ1erPb39K7bkwg0+0UwtODFGKmrAcdMPz0IWmzvDnWtfEnQ3OatqXt78gZaRMhv9wHCUfpo/FUvlO5Vk6TV3TrILpvyIeJxy7ppkdCaoxNfgITQR4LTxkuD2cmd+/0HRCfM3XKq88RUE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708449889; c=relaxed/simple; bh=aKwPCBXNl0gY8TjknCsbiBlOL8RUt4XBoy//XgBLfMI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ok1aX6EYU/9hMSHwW1wxtLg2utCIIRIxG0oHLWOQGvP4pGAwkkenUszTQdN+HYGG4/XyEvxcFujMMEWdovWuHfUdxZi0kQzVdwDCIn12qgolEysuEMqvYSdgt29AqufKNn2f5HbKbRzIlOs9y2fofaih/F4CLjDK/npyM8kKYug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.client-ip=193.175.24.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1rcTrF-0000o6-00; Tue, 20 Feb 2024 18:24:41 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id B9BA7C0267; Tue, 20 Feb 2024 18:24:25 +0100 (CET) Date: Tue, 20 Feb 2024 18:24:25 +0100 From: Thomas Bogendoerfer To: Serge Semin Cc: Greg Kroah-Hartman , Jiri Slaby , Arnd Bergmann , Jiaxun Yang , Alexey Malahov , Stephen Rothwell , Andrew Morton , linux-mips@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] mips: cm: Add CM GCR and L2-sync base address getters declarations Message-ID: References: <20240215171740.14550-1-fancer.lancer@gmail.com> <20240215171740.14550-3-fancer.lancer@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240215171740.14550-3-fancer.lancer@gmail.com> On Thu, Feb 15, 2024 at 08:17:27PM +0300, Serge Semin wrote: > Based on the design pattern utilized in the CM GCR and L2-sync base > address getters implementation the platform-specific code is capable to > re-define the getters and re-use the weakly defined initial versions. But > since the re-definition is supposed to be done in another source file the > interface methods have been globally defined which in its turn causes the > "no previous prototype" warning printed should the re-definition is > finally introduced. Since without the global declarations the pattern can > be considered as incomplete and causing the warning printed, fix it by > providing the respective methods prototype declarations in > "arch/mips/include/asm/mips-cm.h". > > Signed-off-by: Serge Semin > > --- > > Note as I mentioned in the previous patch, since the weak implementation > of the getters isn't utilized other than as a default implementation of > the original methods, we can convert the denoted pattern to a simple > __weak attributed methods. Let me know if that would be more preferable. how about simply remove __mips_cm_l2sync_phys_base() and do everything via mips_cm_phys_base(). And at the moment without anyone overriding mips_cm_phys_base I tend to keep static without __weak. If someone needs, we can change it. Does this make sense ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]