From: "David S. Miller" <davem@davemloft.net>
To: torvalds@osdl.org
Cc: alan@lxorguk.ukuu.org.uk, rmk+lkml@arm.linux.org.uk,
linux-kernel@vger.kernel.org, davem@redhat.com, akpm@osdl.org
Subject: Re: Serial maintainership
Date: Thu, 08 Sep 2005 13:13:58 -0700 (PDT) [thread overview]
Message-ID: <20050908.131358.93602687.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0509080922230.3208@g5.osdl.org>
From: Linus Torvalds <torvalds@osdl.org>
Date: Thu, 8 Sep 2005 09:27:56 -0700 (PDT)
> Mistakes happen, and the way you fix them is not to pull a tantrum, but
> tell people that they are idiots and they broke something, and get them to
> fix it instead.
In all this noise I still haven't seen what is wrong with
the build warning fix I made.
Even as networking maintainer, other people put changes into the
networking as build or warning fixes, and I have to live with that.
If I don't like what happened, I call it out and send in a more
appropriate fix. This is never something worth peeing my pants in
public about.
Anyways, let's discuss the concrete problem here.
The previous definition of uart_handle_sysrq_char(), when
SUPPORT_SYSRQ was disabled, was a plain macro define to "(0)" but this
makes gcc emit empty statement warnings (and rightly so) in cases such
as:
if (tty == NULL) {
uart_handle_sysrq_char(&up->port, ch, regs);
continue;
}
(that example is from drivers/sun/sunsab.c)
So I changed it so that it was an inline function, borrowing the
existing code, so that we get the warning erased _and_ we get type
checking even when SUPPORT_SYSRQ is disabled. So we end up with:
static inline int
uart_handle_sysrq_char(struct uart_port *port, unsigned int ch,
struct pt_regs *regs)
{
#ifdef SUPPORT_SYSRQ
if (port->sysrq) {
if (ch && time_before(jiffies, port->sysrq)) {
handle_sysrq(ch, regs, NULL);
port->sysrq = 0;
return 1;
}
port->sysrq = 0;
}
#endif
return 0;
}
which is what is there now. I can't see what's so wrong with that.
next prev parent reply other threads:[~2005-09-08 20:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-08 15:52 Russell King
2005-09-08 16:38 ` Alan Cox
2005-09-08 16:25 ` Russell King
2005-09-08 19:35 ` Andrew Morton
2005-09-08 16:27 ` Linus Torvalds
2005-09-08 20:13 ` David S. Miller [this message]
2005-09-08 20:22 ` Russell King
2005-09-08 20:26 ` David S. Miller
2005-09-08 20:39 ` Linus Torvalds
2005-09-08 20:42 ` David S. Miller
2005-09-08 21:22 ` Linus Torvalds
2005-09-08 21:26 ` David S. Miller
2005-09-08 21:31 ` Russell King
2005-09-08 21:37 ` Linus Torvalds
2005-09-08 20:31 ` viro
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=20050908.131358.93602687.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®