From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx-rz-2.rrze.uni-erlangen.de (mx-rz-2.rrze.uni-erlangen.de [131.188.11.21]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 2D02A1A074A for ; Tue, 14 Apr 2015 04:33:32 +1000 (AEST) Message-ID: <552C0AA6.4010403@fau.de> Date: Mon, 13 Apr 2015 20:27:50 +0200 From: Andreas Ruprecht MIME-Version: 1.0 To: Daniel Axtens Subject: powerpc: Dead code in commit bdc728a849a7 Content-Type: text/plain; charset=utf-8 Cc: Paul Bolle , "linux-kernel@vger.kernel.org" , linuxppc-dev@lists.ozlabs.org, Stefan Hengelein , Valentin Rothberg List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Daniel, your commit bdc728a849a7 ("powerpc: move find_and_init_phbs() to pSeries specific code") in today's Linux next tree moves a function into the pSeries specific setup.c file. I noticed it because I'm running an automated bot on top of linux-next which looks for variability-related defects with undertaker-checkpatch[0]. Inside the function, there is an #ifdef block which depends on CONFIG_PPC32 to be set. However, the file at arch/powerpc/platforms/pseries/setup.c will only be built if CONFIG_PPC_PSERIES is enabled[1], which through its Kconfig dependencies can only be selected if CONFIG_PPC64 is enabled[2]. As CONFIG_PPC32 and CONFIG_PPC64 are mutually exclusive, the #ifdef can never evaluate to true, and the corresponding code is dead. Should I send a patch which removes the #ifdef and the dead code or would you prefer to do this yourself? Best regards, Andreas [0] https://undertaker.cs.fau.de [1] arch/powerpc/platforms/Makefile, line 18 [2] arch/powerpc/platforms/pseries/Kconfig, line 2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932456AbbDMS14 (ORCPT ); Mon, 13 Apr 2015 14:27:56 -0400 Received: from mx-rz-2.rrze.uni-erlangen.de ([131.188.11.21]:39049 "EHLO mx-rz-2.rrze.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751224AbbDMS1z (ORCPT ); Mon, 13 Apr 2015 14:27:55 -0400 X-RRZE-Submit-IP: 92.74.72.51 Message-ID: <552C0AA6.4010403@fau.de> Date: Mon, 13 Apr 2015 20:27:50 +0200 From: Andreas Ruprecht User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Daniel Axtens CC: Michael Ellerman , Valentin Rothberg , Stefan Hengelein , Paul Bolle , "linux-kernel@vger.kernel.org" , linuxppc-dev@lists.ozlabs.org Subject: powerpc: Dead code in commit bdc728a849a7 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 Hi Daniel, your commit bdc728a849a7 ("powerpc: move find_and_init_phbs() to pSeries specific code") in today's Linux next tree moves a function into the pSeries specific setup.c file. I noticed it because I'm running an automated bot on top of linux-next which looks for variability-related defects with undertaker-checkpatch[0]. Inside the function, there is an #ifdef block which depends on CONFIG_PPC32 to be set. However, the file at arch/powerpc/platforms/pseries/setup.c will only be built if CONFIG_PPC_PSERIES is enabled[1], which through its Kconfig dependencies can only be selected if CONFIG_PPC64 is enabled[2]. As CONFIG_PPC32 and CONFIG_PPC64 are mutually exclusive, the #ifdef can never evaluate to true, and the corresponding code is dead. Should I send a patch which removes the #ifdef and the dead code or would you prefer to do this yourself? Best regards, Andreas [0] https://undertaker.cs.fau.de [1] arch/powerpc/platforms/Makefile, line 18 [2] arch/powerpc/platforms/pseries/Kconfig, line 2