kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: tty: Change tty lock order to master->slave
@ 2014-11-11 12:50 Dan Carpenter
  2014-11-11 17:19 ` Peter Hurley
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-11-11 12:50 UTC (permalink / raw)
  To: kernel-janitors

Hello Peter Hurley,

The patch 2aff5e2bc62d: "tty: Change tty lock order to master->slave"
from Nov 5, 2014, leads to the following static checker warning:

	drivers/tty/tty_mutex.c:50 tty_lock_slave()
	warn: add some parenthesis here?

drivers/tty/tty_mutex.c
    47  void __lockfunc tty_lock_slave(struct tty_struct *tty)
    48  {
    49          if (tty && tty != tty->link) {
    50                  WARN_ON(!mutex_is_locked(&tty->link->legacy_mutex) ||
    51                          !tty->driver->type = TTY_DRIVER_TYPE_PTY ||
    52                          !tty->driver->type = PTY_TYPE_SLAVE);

! has high precedence than = so those tests are never true.  != doesn't
make sense either.  Probably the negate operatons are just copy-and-paste
errors?

    53                  tty_lock(tty);
    54          }
    55  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-11 17:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-11 12:50 tty: Change tty lock order to master->slave Dan Carpenter
2014-11-11 17:19 ` Peter Hurley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).