From mboxrd@z Thu Jan 1 00:00:00 1970 From: Axel Lin Subject: Re: [PATCH 1/7] spi: core: Validate Tx/Rx buffers for non-zero length transfer Date: Wed, 19 Mar 2014 23:43:55 +0800 Message-ID: References: <1395201227.16346.1.camel@phoenix> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: Mark Brown , Wenyou Yang , Fabrice Crohas , Illia Smyrnov , Atsushi Nemoto , Lars-Peter Clausen , linux-spi To: Geert Uytterhoeven Return-path: In-Reply-To: Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: 2014-03-19 16:06 GMT+08:00 Geert Uytterhoeven : > On Wed, Mar 19, 2014 at 4:53 AM, Axel Lin wrote: >> Reject transfer if both tx_buf and rx_buf are NULL for non-zero length transfer. >> Add the checking in spi core so we can remove the same checking in various >> drivers. > > Just wondering: are there any SPI slave drivers that implement dummy cycles > this way? I think I found one such case: drivers/net/wireless/libertas/if_spi.c the dummy_trans has non-zero length, and both tx_buf and rx_buf are NULL. But that means it doesn't work with master drivers with this checking, e.g. all drivers using bitbang library has this checking. Regards, Axel -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html