Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755349AbYLKEtS (ORCPT ); Wed, 10 Dec 2008 23:49:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753023AbYLKEtF (ORCPT ); Wed, 10 Dec 2008 23:49:05 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:56800 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752500AbYLKEtD (ORCPT ); Wed, 10 Dec 2008 23:49:03 -0500 Date: Thu, 11 Dec 2008 04:49:01 +0000 From: Al Viro To: Andrew Morton Cc: Nguyen Anh Quynh , LKML , Kuniyasu Suzaki Subject: Re: [PATCH] fix calls to request_module() Message-ID: <20081211044901.GL28946@ZenIV.linux.org.uk> References: <9cde8bff0812101935j5ef56140k67035d892a868738@mail.gmail.com> <20081211040118.GK28946@ZenIV.linux.org.uk> <20081210201455.0c611484.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081210201455.0c611484.akpm@linux-foundation.org> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 30 On Wed, Dec 10, 2008 at 08:14:55PM -0800, Andrew Morton wrote: > On Thu, 11 Dec 2008 04:01:18 +0000 Al Viro wrote: > > > On Thu, Dec 11, 2008 at 12:35:21PM +0900, Nguyen Anh Quynh wrote: > > > Hi, > > > > > > The request_module() function should always have the 1st param as a > > > format argument. So for example, request_module("i2c-powermac") should > > > be called as request_module("%s", "i2c-powermac"). Otherwise, new gcc > > > like gcc 4.3.2 on Ubuntu 8.10 would spit out a lot of warnings. This > > > patch fixes them all in linus-git tree. > > > > ... and it doesn't address the underlying problems at all. A string literal > > without a single % in it is a perfectly sane and valid format. _Why_ are > > we getting these warning? > > extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); > > ? ... and request_module("i2c-powermac") should be perfectly valid, shouldn't it? I mean, I do not believe that any gcc version would start spewing warnings of printf("-- \n"); and its ilk... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/