From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933393Ab1CWU6o (ORCPT ); Wed, 23 Mar 2011 16:58:44 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:46614 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933284Ab1CWU6n (ORCPT ); Wed, 23 Mar 2011 16:58:43 -0400 Date: Wed, 23 Mar 2011 13:58:35 -0700 From: Andrew Morton To: Geert Uytterhoeven Cc: Stuart Swales , Russell King , linux-kernel@vger.kernel.org Subject: Re: [PATCH] adfs: add hexadecimal filetype suffix option Message-Id: <20110323135835.0c2e296c.akpm@linux-foundation.org> In-Reply-To: References: <4D2DEDDB.1070605@gmail.com> <20110119154915.a0bb2878.akpm@linux-foundation.org> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Mar 2011 21:36:48 +0100 Geert Uytterhoeven wrote: > On Thu, Jan 20, 2011 at 00:49, Andrew Morton wrote: > > On Wed, 12 Jan 2011 18:07:23 +0000 > > Stuart Swales wrote: > >> From: Stuart Swales > > >> +static inline int append_filetype_suffix(char *buf, __u16 filetype) > >> +{ > >> + __ __ if ((__u16) -1 == filetype) > > > > unneeded cast. > > My compiler tends to disagree. On current mainline, it says: > > fs/adfs/adfs.h: In function ___append_filetype_suffix___: > fs/adfs/adfs.h:115: warning: comparison is always false due to limited > range of data type > hm, OK, I'll add a cast. The code seems a bit fishy - it wants 0xffff but the comment says it's handling a 12-bit quantity. Obviously the all-ones pattern has some magical out-of-band meaning here, but it is not explained what that meaning *is*. Perhaps that is described elsewhere.