From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH, RESEND 03/14] drm/vmwgfx: avoid gcc-7 parentheses warning Date: Fri, 14 Jul 2017 12:23:15 -0700 Message-ID: References: <20170714092540.1217397-1-arnd@arndb.de> <20170714092540.1217397-4-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from mail-oi0-f68.google.com ([209.85.218.68]:35344 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751061AbdGNTXQ (ORCPT ); Fri, 14 Jul 2017 15:23:16 -0400 In-Reply-To: Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Arnd Bergmann Cc: Linux Kernel Mailing List , VMware Graphics , Sinclair Yeh , Thomas Hellstrom , David Airlie , Greg Kroah-Hartman , Tejun Heo , Guenter Roeck , IDE-ML , Linux Media Mailing List , Andrew Morton , DRI , Brian Paul On Fri, Jul 14, 2017 at 12:21 PM, Linus Torvalds wrote: > > NAK. This takes unintentionally insane code and turns it intentionally > insane. Any non-zero return is considered an error. > > The right fix is almost certainly to just return -EINVAL unconditionally. Btw, this is why I hate compiler warning fix patch series. Even when they don't actually break the code (and sometimes they do that too), they can actually end up making the code worse. The *intent* of that code was to return zero for the CAP_SYS_ADMIN. But the code has never done that in its lifetime and nobody ever noticed, so clearly the code shouldn't even have tried. Linus