From: firas ashkar <firas.ashkar@savoirfairelinux.com>
To: Arnd Bergmann <arnd@arndb.de>,
alex@digriz.org.uk, Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: add TS7800 FPGA based MMC controller driver
Date: Thu, 20 Oct 2022 10:42:50 -0400 [thread overview]
Message-ID: <0f29aa0297d6fc5daa86f81925754c1f6d3f679c.camel@savoirfairelinux.com> (raw)
In-Reply-To: <a577dfcf-5a0a-4568-8f6d-872a8324dfcc@app.fastmail.com>
thank you for the comments, pls check below for replies and acks
--
Firas Ashkar
Developpeur Système Embarqué
savoirfairelinux.com | Montréal, Québec
Tél.: +1 514 276 5468 ext. 118
On Tue, 2022-10-18 at 21:06 +0200, Arnd Bergmann wrote:
> On Tue, Oct 18, 2022, at 15:38, Firas Ashkar wrote:
> > add standard mmc/host controller driver for TS-7800v1, instead of
> > the
> > original block based 'tssdcore' driver provided by EmbeddedTS
> > linux-2.6.x
> > code base.
>
> I'm looking at this driver since Marc pointed me to your
> work on the platform and I noticed this post as well.
> Not doing a full review, but I'm still pointing out a few
> issue that caught my eye.
>
> > +
> > +#define DRIVER_NAME "ts7800v1_sdmmc"
>
> Maybe drop this macro and just use the string directly.
This define macro used in multiple locations
>
> > +
> > + if (IS_ERR_OR_NULL(pslot->rw_dma_buf)) {
> > + dev_warn(mmc_dev(ts_sdmmc_host->mmc_host),
> > + "%s|%d - Error, No allocated DMA read
> > buffer %ld\n",
> > + __func__, __LINE__, PTR_ERR(pslot-
> > >rw_dma_buf));
> > + *data_error = ret = -ENOMEM;
> > + goto done;
> > + }
> > +
> > + dat0_sent_crc16_buf = kzalloc(sizeof(u16), GFP_KERNEL);
> > + if (IS_ERR_OR_NULL(dat0_sent_crc16_buf)) {
>
> You should never need IS_ERR_OR_NULL, as all interfaces
> in the kernel are supposed to either return an error code
> or return NULL on error. Please fix the error handling
> for this throughout the driver.
ack
>
> > + spin_lock_bh(&ts_sdmmc_host->bh_lock);
>
> I'm a bit confused by your locking. Why do you use
> spin_lock_bh() instead of a normal spin_lock() or
> a spin_lock_irq()? I don't see any use of softirqs
> (typically tasklets and timers) in this driver, so
> disabling softirqs in the critical section should
> not change anything.
ack
>
> Arnd
next parent reply other threads:[~2022-10-20 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221018133800.10636-1-firas.ashkar@savoirfairelinux.com>
[not found] ` <a577dfcf-5a0a-4568-8f6d-872a8324dfcc@app.fastmail.com>
2022-10-20 14:42 ` firas ashkar [this message]
2022-10-20 14:44 ` Arnd Bergmann
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=0f29aa0297d6fc5daa86f81925754c1f6d3f679c.camel@savoirfairelinux.com \
--to=firas.ashkar@savoirfairelinux.com \
--cc=alex@digriz.org.uk \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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®