Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3902010pxt; Tue, 10 Aug 2021 14:18:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfykM/R8eRMSSkYz2IW7YFEKvZwt1/MOFybsKbAfe+PYqJdtQ1bTXoT+DkrGDn5Z/08bHV X-Received: by 2002:a17:907:3d91:: with SMTP id he17mr438755ejc.355.1628630283543; Tue, 10 Aug 2021 14:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628630283; cv=none; d=google.com; s=arc-20160816; b=UAgJcz9c52DlYNDf5nFwwF+qscGKpOj34K4XyLj4UY/JDtfSJxrne/NDyZfvGtswy+ uA2RVKlWTn57eWsTzYxYTTTr7/H9i1BpuT/JbC6TA59OVRwHo8OTZty0DVyiGDgJXntX O+6zq+XYU2P2p6WAopI2eAOskgOVqnmdrw8KYIUY6pw2fpAP+fHHBrvh0yVoItjYwYp+ Ou8kzQz+bKINioB2vdTWEOQpumqik6QEQIakG32bIKtJAlC5pd413pAFLmaa++peBV8I gXz3IFS+xksv7cvx/U6LrjKPFVXXBWpsKZ3gFIzWDDvFnH2NOLJdtFrHgjYPDHSm2Eyo tT8A== 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:from:date:dkim-signature; bh=RGyN6B+oepLK5COlIQIu0Zg6xm5eWTbyTPOp1hx9GWk=; b=WVai0efFvbYzF3rm0M2Pf9vxCQ8fs/lhsG3sPGn6Cx8WtOIBVic/41HwqVt/iBCbDw sIvDEuGSK9l9+nUX3/j6soX6xDMMS/mUGVmG6hynuioJw7l9GPF1QSLHkAYNCFp7rEgk neVTQtaKhk2VKtHTBxOIuDChXx2EnMzyQfrFuVC6OUqq4IJHP6toO0KNgPrH7AMm+8YZ 4Pwr4JSMGp/qI+t/jHQRWopk9cSP3/TeoK7OUc58v8gFxq6jkXu3HnjVdbWzyzatyY+N CKtVRJ12M2TFSmN4jeea+/UNzxLpg0/MaYLxryT+zYWs6SzSR/K7FQag7V6hmIGi1MOQ MFbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qroWg+ly; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hy7si8841172ejc.249.2021.08.10.14.17.38; Tue, 10 Aug 2021 14:18:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qroWg+ly; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233846AbhHJVQJ (ORCPT + 99 others); Tue, 10 Aug 2021 17:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231894AbhHJVQI (ORCPT ); Tue, 10 Aug 2021 17:16:08 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FEF1C0613C1 for ; Tue, 10 Aug 2021 14:15:46 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id k2so23042577plk.13 for ; Tue, 10 Aug 2021 14:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RGyN6B+oepLK5COlIQIu0Zg6xm5eWTbyTPOp1hx9GWk=; b=qroWg+lyQTF5da3CrND6OLNSNWVz6DyWAF8VgL1fo2SJHuwXB9YWKauFqcX85LOkmy 8RVT2SbtEeyj86T+BYpGrorwejhONijGBfF5Um2s5pWADhIRA4Pm7Cg41m/qwitli0Yb 1CJHatNT0IhskHx9iJH8qfrmUSheZNF1QUNWk4sTlYDGzVVDSTiCgGRJgWLdeLm3i92y 9g+28RHSbvrWvWGLYZoIlrdsc0Yv741/j2sC5seihl0fLGS+xz/csEri2x5YveEoazvl F1ok1vfOagpdqz0MaSXXmBlljyp7n8hHCD9j2Pq5Qk4TM3XqwXa9KZsyP2/kFI0JVCET dv9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RGyN6B+oepLK5COlIQIu0Zg6xm5eWTbyTPOp1hx9GWk=; b=KzvZYJ44I45Z5J40v40sRqZvD4W7asOXTh4GbUEFzDgkNjqL5TyDrPTieiZ/qflGhk rEChPZ+EF/TMM/eP5ENP/yWZwm5Yx9w6pnbqeT/7+/RKq/r1xEMK5FRMZSQy7Ammz3Pu ctc8ogGn9vlM3T5ZBYXm9DLISuMNkD/YE3BFGRKE2KHT0N1vlOY9aowD5JvGG9CMvVj3 80Yl5QeA/Z0QyshZ/6KPL45tIuKnzyTzADNDStiwqv0k8alqWm/rn5bES/feuuHv85cO QxiRhBzeFh5PqKFIpSOmZBeKdwMJO0HqpA3LJfh+cQlhCH86VJrOleBs38aWZydpC3yR Lofg== X-Gm-Message-State: AOAM533iBMnkVptOElhSG6oTjAEnSx6P8Zwa1OwPqGpFlRKTIj+oXOCJ ZIUt1Fc+0do0XfQLGEf4ulQ= X-Received: by 2002:a17:90b:609:: with SMTP id gb9mr33751834pjb.156.1628630145855; Tue, 10 Aug 2021 14:15:45 -0700 (PDT) Received: from localhost (g195.61-45-49.ppp.wakwak.ne.jp. [61.45.49.195]) by smtp.gmail.com with ESMTPSA id j187sm24731451pfb.132.2021.08.10.14.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 14:15:45 -0700 (PDT) Date: Wed, 11 Aug 2021 06:15:43 +0900 From: Stafford Horne To: Randy Dunlap Cc: LKML , Openrisc , kernel test robot , Jonas Bonn , Stefan Kristiansson , Andrew Morton , Mike Rapoport , Christophe JAILLET , Kefeng Wang Subject: Re: [PATCH v2] openrisc: Fix compiler warnings in setup Message-ID: References: <20210808135437.3640549-1-shorne@gmail.com> <8a830ab7-6b66-1ca9-bd73-fc1551def648@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8a830ab7-6b66-1ca9-bd73-fc1551def648@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 09, 2021 at 10:51:01AM -0700, Randy Dunlap wrote: > On 8/8/21 6:54 AM, Stafford Horne wrote: > > This was pointed out with the recent name change of or32_early_setup to > > or1k_early_setup. Investigating the file I found a few other warnings > > so cleaning them up here. > > > > arch/openrisc/kernel/setup.c:220:13: warning: no previous prototype for 'or1k_early_setup' [-Wmissing-prototypes] > > 220 | void __init or1k_early_setup(void *fdt) > > | ^~~~~~~~~~~~~~~~ > > > > Fix this the missing or1k_early_setup prototype warning by adding an > > asm/setup.h file to define the prototype. > > > > arch/openrisc/kernel/setup.c:246:13: warning: no previous prototype for 'detect_unit_config' [-Wmissing-prototypes] > > 246 | void __init detect_unit_config(unsigned long upr, unsigned long mask, > > | ^~~~~~~~~~~~~~~~~~ > > > > The function detect_unit_config is not used, just remove it. > > > > arch/openrisc/kernel/setup.c:221: warning: Function parameter or member 'fdt' not described in 'or1k_early_setup' > > > > Add @fdt docs to the function comment to suppress this warning. > > > > Reported-by: kernel test robot > > Signed-off-by: Stafford Horne > > Reviewed-by: Randy Dunlap > > Thanks. Thank you. > > --- > > > > Changes since v1: > > - Add #include to fix compile failure. Pointed out by robot and > > randy. > > > > arch/openrisc/include/asm/setup.h | 15 +++++++++++++++ > > arch/openrisc/kernel/setup.c | 16 +--------------- > > 2 files changed, 16 insertions(+), 15 deletions(-) > > create mode 100644 arch/openrisc/include/asm/setup.h > > > > diff --git a/arch/openrisc/include/asm/setup.h b/arch/openrisc/include/asm/setup.h > > new file mode 100644 > > index 000000000000..9acbc5deda69 > > --- /dev/null > > +++ b/arch/openrisc/include/asm/setup.h > > @@ -0,0 +1,15 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +/* > > + * Copyright (C) 2021 Stafford Horne > > + */ > > +#ifndef _ASM_OR1K_SETUP_H > > +#define _ASM_OR1K_SETUP_H > > + > > +#include > > +#include > > + > > +#ifndef __ASSEMBLY__ > > +void __init or1k_early_setup(void *fdt); > > +#endif > > + > > +#endif /* _ASM_OR1K_SETUP_H */ > > diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c > > index 7eddcac0ef2f..0cd04d936a7a 100644 > > --- a/arch/openrisc/kernel/setup.c > > +++ b/arch/openrisc/kernel/setup.c > > @@ -210,6 +210,7 @@ void __init setup_cpuinfo(void) > > /** > > * or1k_early_setup > > + * @fdt: pointer to the start of the device tree in memory or NULL > > * > > * Handles the pointer to the device tree that this kernel is to use > > * for establishing the available platform devices. > > @@ -243,21 +244,6 @@ static inline unsigned long extract_value(unsigned long reg, unsigned long mask) > > return mask & reg; > > } > > -void __init detect_unit_config(unsigned long upr, unsigned long mask, > > - char *text, void (*func) (void)) > > -{ > > - if (text != NULL) > > - printk("%s", text); > > - > > - if (upr & mask) { > > - if (func != NULL) > > - func(); > > - else > > - printk("present\n"); > > - } else > > - printk("not present\n"); > > -} > > - > > /* > > * calibrate_delay > > * > > > > > -- > ~Randy >