All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karsten Keil <kkeil@linux-pingi.de>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 3/8] mISDN: avmfritz use the bigger fifo of chip version 2
Date: Wed, 16 May 2012 09:00:11 +0200	[thread overview]
Message-ID: <4FB3507B.10808@linux-pingi.de> (raw)
In-Reply-To: <20120516.011615.2055798345695085276.davem@davemloft.net>

Am 16.05.2012 07:16, schrieb David Miller:
> From: Karsten Keil<kkeil@linux-pingi.de>
> Date: Wed, 16 May 2012 06:22:49 +0200
>
>> +	mode = (AVM_FRITZ_PCIV2 == fc->type) ? HDLC_FIFO_SIZE_128 : 0;
>
> Please don't do this "CONSTANT == variable" type testing order, it's
> completely unnatural and not something we commonly do elsewhere in the
> networking code.
>

I fully agree, looks much better.

> I know some coders bible somewhere says that this is how you avoid
> accidental assignments, but it's too ugly to live.

With todays compilers as long you do not disable/ignore warnings it 
should be safe as well.

Will send version 2 of the patchset soon (with all other issues fixed too)

Karsten

  reply	other threads:[~2012-05-16  9:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16  4:22 [PATCH 0/8] mISDN: Fixes and enhancements for the data channels Karsten Keil
2012-05-16  4:22 ` [PATCH 1/8] mISDN: Cleanup channel also if it already was deactivated Karsten Keil
2012-05-16  4:22 ` [PATCH 2/8] mISDN: Early confirm for transparent data Karsten Keil
2012-05-16  4:22 ` [PATCH 3/8] mISDN: avmfritz use the bigger fifo of chip version 2 Karsten Keil
2012-05-16  5:16   ` David Miller
2012-05-16  7:00     ` Karsten Keil [this message]
2012-05-16  4:22 ` [PATCH 4/8] mISDN: Bugfix hfcsusb: usb endpoint activation/deactivation Karsten Keil
2012-05-16  4:22 ` [PATCH 5/8] mISDN: Reduce RX buffer allocation for transparent data Karsten Keil
2012-05-16  5:21   ` David Miller
2012-05-16  4:22 ` [PATCH 6/8] mISDN: Allow to set a minimum length " Karsten Keil
2012-05-16  5:18   ` David Miller
2012-05-16  4:22 ` [PATCH 7/8] mISDN: Implement MISDN_CTRL_FILL_EMPTY for more drivers Karsten Keil
2012-05-16  4:22 ` [PATCH 8/8] mISDN: Implement MISDN_CTRL_RX_OFF " Karsten Keil

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=4FB3507B.10808@linux-pingi.de \
    --to=kkeil@linux-pingi.de \
    --cc=davem@davemloft.net \
    --cc=netdev@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.