Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753155AbcLZFcs (ORCPT ); Mon, 26 Dec 2016 00:32:48 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:51804 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751092AbcLZFcp (ORCPT ); Mon, 26 Dec 2016 00:32:45 -0500 Date: Mon, 26 Dec 2016 13:28:23 +0800 From: Jisheng Zhang To: Greg KH CC: , , Subject: Re: [PATCH] serial: 8250_dw: #ifdef out dw8250_acpi_match if ACPI isn't set Message-ID: <20161226132823.65f6ff6b@xhacker> In-Reply-To: <20161223180923.GA26878@kroah.com> References: <20161223123355.1370-1-jszhang@marvell.com> <20161223180923.GA26878@kroah.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-12-26_04:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1612260095 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1051 Lines: 31 Hi Greg, On Fri, 23 Dec 2016 19:09:23 +0100 Greg KH wrote: > > On Fri, Dec 23, 2016 at 08:33:55PM +0800, Jisheng Zhang wrote: > > dw8250_acpi_match is used only when ACPI is enabled. Fix the following > > gcc warning when W=1 is set: > > > > drivers/tty/serial/8250/8250_dw.c:640:36: warning: 'dw8250_acpi_match' > > defined but not used [-Wunused-const-variable=] > > Don't set W=1 then, this type of "fix" is foolish and is just going to > make code messier, sorry. Per my understanding of commit c9c6837d3931 ("kbuild: move -Wunused-const-variable to W=1 warning level"), "Once we have eliminated the majority of the warnings for both, we can put them back into the default list.", so we'll have such warning one day without W=1 in the future. And FWICT, other devices drivers which could be used in ACPI and DT also add the "#ifdef ACPI" to the acpi match table, such as: drivers/ata/ahci_xgene.c drivers/dma/dw/platform.c drivers/i2c/busses/i2c-designware-platdrv.c drivers/hid/i2c-hid/i2c-hid.c drivers/usb/dwc3/core.c Thanks, Jisheng