From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ameya Palande Subject: Re: [PATCH 1/4] DSPBRIDGE: Fix macros that break when inside an if/else Date: Tue, 14 Jul 2009 14:17:58 +0300 Message-ID: <4A5C6966.7080309@nokia.com> References: <1246978928-7139-1-git-send-email-ameya.palande@nokia.com> <496565EC904933469F292DDA3F1663E602A30E140D@dlee06.ent.ti.com> <1247569366.13580.9.camel@pcarmody-desktop> <7A436F7769CA33409C6B44B358BFFF0C011E5ED158@dlee02.ent.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.nokia.com ([192.100.122.233]:40846 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751215AbZGNLSG (ORCPT ); Tue, 14 Jul 2009 07:18:06 -0400 In-Reply-To: <7A436F7769CA33409C6B44B358BFFF0C011E5ED158@dlee02.ent.ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "ext Menon, Nishanth" Cc: "Carmody Phil.2 (EXT-Ixonos/Helsinki)" , "Guzman Lugo, Fernando" , "linux-omap@vger.kernel.org" , "Kanigeri, Hari" ext Menon, Nishanth wrote: > Phil, >> -----Original Message----- >> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap- >> owner@vger.kernel.org] On Behalf Of Phil Carmody >> Sent: Tuesday, July 14, 2009 6:03 AM >> >> On Fri, 2009-07-10 at 01:51 +0200, ext Guzman Lugo, Fernando wrote: >>> Thanks for the patch, it only has indentation problems, this is the >> checkpatch output: >>> WARNING: suspect code indent for conditional statements (8, 12) >>> #34: FILE: drivers/dsp/bridge/pmgr/wcd.c:152: >>> + if (DSP_SUCCEEDED(status)) { \ >>> + if (unlikely((src) == NULL) || \ >>> >>> WARNING: line over 80 characters >>> #36: FILE: drivers/dsp/bridge/pmgr/wcd.c:154: >>> + unlikely(copy_from_user(dest, src, (elements) * >> sizeof(*(dest))))) { \ >>> WARNING: suspect code indent for conditional statements (8, 12) >>> #46: FILE: drivers/dsp/bridge/pmgr/wcd.c:164: >>> + if (DSP_SUCCEEDED(status)) { \ >>> + if (unlikely((dest) == NULL) || >> \ >>> WARNING: line over 80 characters >>> #48: FILE: drivers/dsp/bridge/pmgr/wcd.c:166: >>> + unlikely(copy_to_user(dest, src, (elements) * >> sizeof(*(src))))) { \ >>> total: 0 errors, 4 warnings, 48 lines checked >>> >>> Could you please fix that warning please? >> I suspect the only way to fix those warnings would either introduce >> other warnings, or \ > Gentle query: Have we already tried this or is it just a suspicion? > > >> would \ >> lead \ >> to \ >> utterly \ >> unread- \ >> able \ >> code. >> >> If you check how and why the original TI-originated version of the code >> does not follow the linux coding standards, the difficulties we would >> have making a warning-free patch of it should be apparent. > > Past is past. The idea was not to introduce anymore warning code. I agree but if you want to stick to this, then I don't think we can get a readable macro. And I personally prefer readability over warnings generated by checkpatch.pl script. Cheers, Ameya.