Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754442AbZKCT6s (ORCPT ); Tue, 3 Nov 2009 14:58:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752572AbZKCT6s (ORCPT ); Tue, 3 Nov 2009 14:58:48 -0500 Received: from mail-iw0-f180.google.com ([209.85.223.180]:43481 "EHLO mail-iw0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751766AbZKCT6r (ORCPT ); Tue, 3 Nov 2009 14:58:47 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=fBnZ5K3dEd3YEtp0T6BA2RjHiAXLnzisIjMyEQEnVTPu43F+Sg0BAT5SU9ScdLmnto BBPdankxniSOMqMETC95f7GErrqpZpZpcKKzZpBobvzAYPdMeHjaUK3+2hFJ7AavRQ+o IvdU8lFr+s/9zupz7RctAtIDoa3KHx3m4Jf84= MIME-Version: 1.0 In-Reply-To: <20091103191233.0c3ba736@lxorguk.ukuu.org.uk> References: <1257273488.9427.27.camel@mulgrave.site> <20091103105921.160d5599.akpm@linux-foundation.org> <20091103191233.0c3ba736@lxorguk.ukuu.org.uk> Date: Wed, 4 Nov 2009 04:58:50 +0900 X-Google-Sender-Auth: 84bd8392ade74290 Message-ID: <2f11576a0911031158r7fabb96fx8073bb4e86f4981e@mail.gmail.com> Subject: Re: [PATCH] strstrip incorrectly marked __must_check From: KOSAKI Motohiro To: Alan Cox Cc: Andrew Morton , James Bottomley , linux-scsi@vger.kernel.org, linux-kernel Content-Type: multipart/mixed; boundary=0015177404c6482da004777cec1b Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5324 Lines: 95 --0015177404c6482da004777cec1b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2009/11/4 Alan Cox : >> static inline void strsrip_tail(char *str) >> { >> =A0 =A0 =A0 char *x __used; >> =A0 =A0 =A0 x =3D strstrip(str); >> } > > Bikeshed time but its cleaner to do > > static inline __must_check void strstrip(char *str) > { > =A0 =A0 =A0 =A0return strim(str); > } > > and make strim() the old strstrip function without the check requirement Okey... [quick hack and compile check] done :) sorry for attached file. I'm under poor mail environment now. --0015177404c6482da004777cec1b Content-Type: application/octet-stream; name="0001-lib-Introduce-strim.patch" Content-Disposition: attachment; filename="0001-lib-Introduce-strim.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g1l2xg480 RnJvbSA5NGE4NjQyNGE4ODJkNTJmY2QxMTAzOWQxMWZiZDAzNjNhMzE0NzJmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLT1NBS0kgTW90b2hpcm8gPGtvc2FraS5tb3RvaGlyb0BqcC5m dWppdHN1LmNvbT4KRGF0ZTogV2VkLCA0IE5vdiAyMDA5IDA0OjQ3OjIzICswOTAwClN1YmplY3Q6 IFtQQVRDSF0gbGliOiBJbnRyb2R1Y2Ugc3RyaW0KClJlY2VudGx5LCBXZSBtYXJrZWQgc3Ryc3Ry aXAoKSBhcyBtdXN0X2NoZWNrLiBiZWNhdXNlIGl0IHdhcyBmcmVxdWVudGx5IG1pc3VzZWQgYW5k Cml0IHNob3VsZCBiZSBjaGVja2VkLiBob3dldmVyLCB3ZSBmb3VuZCBvbmUgZXhjZXB0aW9uLiBz Y3NpL2lwci5jIGludGVudGlvbmFsbHkgaWdub3JlCnJldHVybiB2YWx1ZSBvZiBzdHJzdHJpcC4g YmVjYXVzZSwgaXQgd2lzaCB0byBrZWVwIHRoZSB3aGl0ZXNwYWNlIGF0IHRoZSBiZWdpbm5pbmcu CgpUaHVzLCB3ZSBuZWVkIHRvIGtlZXAgd2l0aCBhbmQgd2l0aG91dCBjaGVja2VkIHdoaXRlc3Bh Y2UgdHJpbSBmdW5jdGlvbi4gVGhpcyBwYXRjaAptYWtlcyB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gKnMpCiAKIAlyZXR1cm4gczsKIH0KLUVYUE9SVF9TWU1CT0woc3Ryc3RyaXApOworRVhQ T1JUX1NZTUJPTChzdHJpbSk7CiAKICNpZm5kZWYgX19IQVZFX0FSQ0hfU1RSTEVOCiAvKioKLS0g CjEuNi4yLjUKCg== --0015177404c6482da004777cec1b-- -- 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/