From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752892AbdGFFzL (ORCPT ); Thu, 6 Jul 2017 01:55:11 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34334 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbdGFFzK (ORCPT ); Thu, 6 Jul 2017 01:55:10 -0400 Subject: Re: linux-next: build warning after merge of the rtc tree To: Stephen Rothwell , Alexandre Belloni Cc: Linux-Next Mailing List , Linux Kernel Mailing List References: <20170706142407.71e3b513@canb.auug.org.au> From: Heiner Kallweit Message-ID: Date: Thu, 6 Jul 2017 07:54:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170706142407.71e3b513@canb.auug.org.au> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 06.07.2017 um 06:24 schrieb Stephen Rothwell: > Hi Alexandre, > > After merging the rtc tree, today's linux-next build (powerpc > ppc64_defconfig) produced this warning: > > drivers/rtc/rtc-ds1307.c: In function 'ds1307_get_time': > drivers/rtc/rtc-ds1307.c:342:26: warning: unused variable 'chip' [-Wunused-variable] > const struct chip_desc *chip = &chips[ds1307->type]; > ^ > > Introduced by commit > > 436c93db60a4 ("rtc: ds1307: factor out century bit handling") > Right, if RTC_DRV_DS1307 is defined but RTC_DRV_DS1307_CENTURY is not then variable chip isn't used in ds1307_get_time. We could fix this by simply defining variable chip only if RTC_DRV_DS1307_CENTURY is defined. However the current situation leaves the question why RTC_DRV_DS1307_CENTURY isn't set in the ppc64 defconfig. This config option should be n only temporarily if a system has to be fixed, see description of this option. Maybe we should set this config option to "default y" ? Rgds, Heiner