Re: [PATCH 1/1] driver:mtd:spi-nor: Add Micron quad I/O support
From: Marek Vasut
Date: Fri Sep 26 2014 - 04:46:18 EST
On Friday, September 26, 2014 at 10:39:38 AM, bpqw wrote:
> >> + /* set EVCR ,enable quad I/O */
> >> + nor->cmd_buf[0] = val & ~EVCR_QUAD_EN_MICRON;
> >> + ret = nor->write_reg(nor, SPINOR_OP_WD_EVCR, nor->cmd_buf, 1, 0);
> >> + if (ret < 0) {
> >> + dev_err(nor->dev,
> >> + "error while writing EVCR register\n");
> >> + return -EINVAL;
> >> + }
> >> +
> >> + if (wait_till_ready(nor))
> >> + return 1;
> >
> >Why does this not return proper error code or even better, return value
> >from wait_till_ready() ?
> >
> >Other than that, there's nothing wrong with the patch I think.
>
> Hi,Marek
> Thanks for your review,you can find the same usage in the spi-nor.c.
> Below method is OK? Or you can give me some suggestion.
>
> if (wait_till_ready(nor))
> return - EINVAL;
ret = wait_till_readynor()
if (ret)
return ret;
But all right, this means the subsystem isn't perfect. Well, others, what do you
think ?
Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/