Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp734531pxf; Wed, 24 Mar 2021 14:48:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjn7FUBMWMHyL7Q0vovZItzGtuRKj6MNKaJuc/ivZNFoC2qo6/Bz4zqxQ8Od3w6fx9KubX X-Received: by 2002:a17:906:90d8:: with SMTP id v24mr5824229ejw.547.1616622526432; Wed, 24 Mar 2021 14:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616622526; cv=none; d=google.com; s=arc-20160816; b=INeyL0lR4S33+7c3rDmvWt9himjjpOQ+G9BncZt8QjYO2A16ZbgM2/I5DHS6pLfCjD D/OUS4l6o5U/M3DRkuhjtmCWitIhjpI4p8CdUboTyiu0vyYG2/yGlIq2RUUg920mam2g cj2afbp4UdUY+1gO8kwQUCC9zKCC8zCsazz2ZGbesGbjdHlIwBFLzB6+TCoxzvEU29QN HElk+wW7y6GH+mDzUWC28NE7xzf/We/zpjCn570acBA4LWiaNt9I/F15JzoXtKLP1sg5 LW1u1y3FC7/CUXrUByBcZqp7dEs/BG2qEWP9HqJRr5NVzehBFbedcIZC6A1/tvHtsUSS 4W6A== 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 :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=zBPtvq9OVTnedMAnEv1LI0mCuNbDjbuOJ0jlYrEa/PA=; b=ChbIJpfo6epEE4xYNH3RvX3Gfcbtn0fCdlX2Q//55UvYCghoK4falNvsGgJI0rL0CC tBqGe1DgPtAqzkuUSyPNbbmlAmLvcwab1Pe1Kh7vRG51Tj3JGiTrdcq4GBwAzHM07MJb wckptkPKILK+SLXOkL0+C8Lenlp8EeiMTuZ36r0JcuCY/3ZMt8Ucr1s28vGCnqDy3AuM DDnXfupA01QX0NKkQNHNXy3DwIHbtPAveL+rXlTSQpPZB+BcwBokY0XTA+jrWcP347sW 89i/KHXiEUs48S3civX8SUBNeO1ua1CANv9P1JZQDYTRhdxxyIsmApyhRO4YmVS5odf4 UNyw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g13si2671976ejc.80.2021.03.24.14.48.23; Wed, 24 Mar 2021 14:48:46 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231278AbhCXB64 (ORCPT + 99 others); Tue, 23 Mar 2021 21:58:56 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:14512 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234684AbhCXB6k (ORCPT ); Tue, 23 Mar 2021 21:58:40 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F4rtb1krZzPlZk; Wed, 24 Mar 2021 09:56:07 +0800 (CST) Received: from [10.67.110.136] (10.67.110.136) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Wed, 24 Mar 2021 09:58:34 +0800 Subject: Re: [PATCH v2 -next] powerpc: kernel/time.c - cleanup warnings To: Alexandre Belloni CC: , , , , , , , , , , , , , , References: <20210323091257.90054-1-heying24@huawei.com> From: "heying (H)" Message-ID: Date: Wed, 24 Mar 2021 09:58:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.110.136] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear, ?? 2021/3/24 6:18, Alexandre Belloni ะด??: > Hello, > > On 23/03/2021 05:12:57-0400, He Ying wrote: >> We found these warnings in arch/powerpc/kernel/time.c as follows: >> warning: symbol 'decrementer_max' was not declared. Should it be static? >> warning: symbol 'rtc_lock' was not declared. Should it be static? >> warning: symbol 'dtl_consumer' was not declared. Should it be static? >> >> Declare 'decrementer_max' and 'rtc_lock' in powerpc asm/time.h. >> Rename 'rtc_lock' in drviers/rtc/rtc-vr41xx.c to 'vr41xx_rtc_lock' to >> avoid the conflict with the variable in powerpc asm/time.h. >> Move 'dtl_consumer' definition behind "include " because it >> is declared there. >> >> Reported-by: Hulk Robot >> Signed-off-by: He Ying >> --- >> v2: >> - Instead of including linux/mc146818rtc.h in powerpc kernel/time.c, declare >> rtc_lock in powerpc asm/time.h. >> > V1 was actually the correct thing to do. rtc_lock is there exactly > because chrp and maple are using mc146818 compatible RTCs. This is then > useful because then drivers/char/nvram.c is enabled. The proper fix > would be to scrap all of that and use rtc-cmos for those platforms as > this drives the RTC properly and exposes the NVRAM for the mc146818. Do you mean that 'rtc_lock' declared in linux/mc146818rtc.h points to same thing as that defined in powerpc kernel/time.c? And you think V1 was correct? Oh, I should have added you to my patch V1 senders:) > > Or at least, if there are no users for the char/nvram driver on those > two platforms, remove the spinlock and stop enabling CONFIG_NVRAM or > more likely rename the symbol as it seems to be abused by both chrp and > powermac. > > I'm not completely against the rename in vr41xxx but the fix for the > warnings can and should be contained in arch/powerpc. Yes, I agree with you. But I have no choice because there is a compiling error. Maybe there's a better way. So, what about my patch V1? Should I resend it and add you to senders? Thanks.