Re: [PATCH] i2c: add extra check to safe DMA buffer helper

2019-03-10 Thread Hsin-Yi Wang
On Sat, Mar 9, 2019 at 6:54 PM Wolfram Sang wrote: > > Make sure we report no buffer for 0-length messages. This can only > happen if threshold is set to 0 which is kind of bogus but we should > handle this situation nonetheless. > > Reported-by: Hsin-Yi Wang > Fixes: e9

Re: [PATCH] i2c: add extra check to safe DMA buffer helper

2019-03-11 Thread Hsin-Yi Wang
On Tue, Mar 12, 2019 at 2:46 AM Wolfram Sang wrote: > > > > How about also printing some warning if threshold is zero? Since > > Hmm, not a warning because a user of a kernel can't do much about it. A > debug might make sense; it is for developers and will be compiled away > for production use. >

Re: [PATCH v2] i2c: add extra check to safe DMA buffer helper

2019-03-12 Thread Hsin-Yi Wang
o educate callers of this function. > > Reported-by: Hsin-Yi Wang > Fixes: e94bc5d18be0 ("i2c: add helpers to ease DMA handling") > Signed-off-by: Wolfram Sang Thanks! Reviewed-by: Hsin-Yi Wang > --- > > Changes since v1: > * add debug print >