On 03/29/2015 08:03 AM, Martin Sperl wrote:
> Signed-off-by: Martin Sperl <ker...@martin.sperl.org>
> Tested-by: Martin Sperl <ker...@martin.sperl.org>

It would be useful to have a commit description saying why such a
warning was useful.

> diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c

> @@ -82,6 +82,7 @@ struct bcm2835_spi {
>       u8 *rx_buf;
>       int tx_len;
>       int rx_len;
> +     bool native_cs_use_warning_done;
>  };
...
> @@ -294,6 +298,14 @@ static int bcm2835_spi_setup(struct spi_device *spi)
...
> +     /* we are in the native chipselect case now,
> +      * so warn about the fact that some things may not work as well

What things and why? (I'm asking mainly because that should be in the
commit description and perhaps this comment).

> +      */
> +     if (!bs->native_cs_use_warning_done) {
> +             dev_warn(&spi->dev,
> +                      "setup: native chipselect is used - some driver 
> functions/optimizations are not applied\n");
> +             bs->native_cs_use_warning_done = 1;
> +     }

Isn't there a warn_once() that would remove the need to check/set
native_cs_use_warning_done?
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to