All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] char: fix sparse shadowed variable warnings in cyclades.c
Date: Wed, 27 Feb 2008 15:40:00 -0800	[thread overview]
Message-ID: <1204155600.20280.23.camel@brick> (raw)
In-Reply-To: <20080227153448.a559b6c3.akpm@linux-foundation.org>

On Wed, 2008-02-27 at 15:34 -0800, Andrew Morton wrote:
> On Fri, 22 Feb 2008 10:14:15 -0800
> Harvey Harrison <harvey.harrison@gmail.com> wrote:
> 
> Unrelated to your change, but...
> 
> We prefer min_t over casts like this (not sure why, but let's be consistent)
> 
> The reason for this cast is that all this code is using `int' for the
> transfer count (arguably wrong - should use size_t, but that propagates all
> the way to tty_operations.write) but cyclades has
> 
> #define SERIAL_XMIT_SIZE        (min(PAGE_SIZE, 4096))
> 
> which is unsigned on most architectures.
> 
> A possibly-sane fix for all of this is to use min_t in the above then nuke
> the casts.
> 

I'll trace this through and get you a patch.

Harvey




      reply	other threads:[~2008-02-27 23:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 18:14 [PATCH] char: fix sparse shadowed variable warnings in cyclades.c Harvey Harrison
2008-02-27 23:34 ` Andrew Morton
2008-02-27 23:40   ` Harvey Harrison [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1204155600.20280.23.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.