Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2875957pxt; Mon, 9 Aug 2021 10:53:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6GVs+hqRLIAOP5h+K99vT+u+I/f9vcmGUW/plLDSSia0JiuB5T5k2FmFzNL46I1jvoN8u X-Received: by 2002:aa7:d919:: with SMTP id a25mr14379921edr.386.1628531636088; Mon, 09 Aug 2021 10:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628531636; cv=none; d=google.com; s=arc-20160816; b=gHhDBUQnmzzpMETYkRIzWGT4fH+KrvBtetAZ1RLjT5FqGUguMSqDSuiyRDTXAYNQoL Y+Y27pZsnwmVmfY3F+0Zuk2ei/30XVZIx9jrZeC+7Au+Y0qWKUqexBATVAXIOtxvDLWP asorGziVU1awzXh3Y6+t+kHFWIWgpzn5qnkdH1khxdkZnh1uCv+ND7+6v8gVLuF/xHWB chIZL7zWtQMA78gYpGC8onkERWH/w97aFumz9iwzZEiiFUKNQfRSJEtZ7S2FA71A5GeA DiKOEBdotXjvBOSLKGPe8KPyu9XVs+wWgaqU0uO4ma/rENsQaOUrs2rSg9ED1ao/prwP 5RCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=9CnNVCZZu2fyVetALAt1fRTPE5K8dZRhQ8cLoo/Y7cY=; b=FyYBGud48Yq21aPdVXiXQYrX2Xjm0TU0kePoJhEa7yb+D4YsCXv4PjKk8fmzfSF+3p eRkp4ZM4ptPIrPNnODyChj+DMDfrTlcrzHZ1tiB5hGsFylcpM0f/y3JzDpRVXOjXXGv2 DRMZ6xHzIJi3jip3X5SicMRHlgB9+bYp9P80hGbYIWaNKPKKQ6urGQPqep8X/WkC/aIU aKg50Oh3zPGPuGgQy5mB3YNFgBL5kIWQIiIuj6q+gvd6ShuI6ZteKpfrcrN3W1DsYaK4 Jc2xVaUvhRLjEJbmIo4I4NYUnv2Bmq8M5fMVk6coZOqtT3w9NQNKqmbsCYrQZshAOKMC uO6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=gY7MMJfq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e11si3695147ejx.252.2021.08.09.10.53.32; Mon, 09 Aug 2021 10:53:56 -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=@infradead.org header.s=bombadil.20210309 header.b=gY7MMJfq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234707AbhHIRwI (ORCPT + 99 others); Mon, 9 Aug 2021 13:52:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234503AbhHIRwH (ORCPT ); Mon, 9 Aug 2021 13:52:07 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5996AC0613D3 for ; Mon, 9 Aug 2021 10:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=9CnNVCZZu2fyVetALAt1fRTPE5K8dZRhQ8cLoo/Y7cY=; b=gY7MMJfqR0ds3FjAhP37Pc+OKb 6Ej7RGZUB69P7OPbmEIDI7o1FXMlfeGH4zq2VY9d9S6DkJcY/t9L5/oDvpZNI1neCQTpEAO0IjWRN CgQUeQ6WqCGnC0Ys20e++79jcbnPCssFKZYO0i1b/0gvfYOMxMIexqneRTlc2QXMGZEhFSBirc5DY wGUeTKQV7n0k+ZUUST9gimBhgLbEpmy5a1JJZLEN6mAHu/YFYlF0G5n4ddbCBueIUH10Da1qFm0hY 9dsimS9/+e27yyJQ6Ba9YrSQNURUt6E8FOsgI5KW7pC0dSMQhcix3QKp1BHUnFFMWVERLY6nUpYQG EM6DAB4w==; Received: from [2601:1c0:6280:3f0::aa0b] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mD9Qx-001bEl-Iv; Mon, 09 Aug 2021 17:51:31 +0000 Subject: Re: [PATCH v2] openrisc: Fix compiler warnings in setup To: Stafford Horne , LKML Cc: Openrisc , kernel test robot , Jonas Bonn , Stefan Kristiansson , Andrew Morton , Mike Rapoport , Christophe JAILLET , Kefeng Wang References: <20210808135437.3640549-1-shorne@gmail.com> From: Randy Dunlap Message-ID: <8a830ab7-6b66-1ca9-bd73-fc1551def648@infradead.org> Date: Mon, 9 Aug 2021 10:51:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210808135437.3640549-1-shorne@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > --- > > 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