From: Dan Carpenter <dan.carpenter@oracle.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Qiang Zhao <qiang.zhao@nxp.com>, Li Yang <leoyang.li@nxp.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] fsl/qe: ucc: copy and paste bug in ucc_get_tdm_sync_shift()
Date: Mon, 4 Jun 2018 16:40:24 +0300 [thread overview]
Message-ID: <20180604134024.dmd7mn2wggqpmkcq@mwanda> (raw)
In-Reply-To: <alpine.DEB.2.20.1806042223580.3542@hadrien>
On Mon, Jun 04, 2018 at 10:25:14PM +0900, Julia Lawall wrote:
>
>
> On Mon, 4 Jun 2018, Dan Carpenter wrote:
>
> > There is a copy and paste bug so we accidentally use the RX_ shift when
> > we're in TX_ mode.
> >
> > Fixes: bb8b2062aff3 ("fsl/qe: setup clock source for TDM mode")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > Static analysis work. Not tested. This affects the success path, so
> > we should probably test it.
>
> Maybe this is another one? I don't have time to look into it at the
> moment...
>
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
>
> /* For strict priority entries defines the number of consecutive
> * slots for the highest priority.
> */
> REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS :
> NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100);
> /* Mapping between the CREDIT_WEIGHT registers and actual client
> * numbers
> */
>
> I find some others that choose between constants, such as ... ? 0 : 0.
I feel like it should warn about all of those because people shouldn't
be submitting unfinished written code to the kernel. Coccinelle is a
lot better for this than Smatch is because it's pre-processor stuff.
regards,
dan carpenter
next prev parent reply other threads:[~2018-06-04 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 11:58 [PATCH] fsl/qe: ucc: copy and paste bug in ucc_get_tdm_sync_shift() Dan Carpenter
2018-06-04 12:06 ` Mathieu Malaterre
2018-08-29 9:39 ` Dan Carpenter
2018-08-29 22:41 ` Li Yang
2018-06-04 13:25 ` Julia Lawall
2018-06-04 13:40 ` Dan Carpenter [this message]
2018-06-04 13:46 ` Julia Lawall
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=20180604134024.dmd7mn2wggqpmkcq@mwanda \
--to=dan.carpenter@oracle.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=qiang.zhao@nxp.com \
/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