[lkml]   [2018]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [QUEUED v20180920 15/16] lib: Add memcat_p(): paste 2 pointer arrays together
On Thu, Sep 20, 2018 at 03:45:52PM +0300, Alexander Shishkin wrote:
> This adds a helper to paste 2 pointer arrays together, useful for merging
> various types of attribute arrays. There are a few places in the kernel
> tree where this is open coded, and I just added one more in the STM class.
> The naming is inspired by memset_p() and memcat(), and partial credit for
> it goes to Andy Shevchenko.
> This patch adds the function wrapped in a type-enforcing macro and a test
> module.
> Signed-off-by: Alexander Shishkin <>
> Cc: Andy Shevchenko <>

It would be good to get someone else to review/ack a core function like
this, to verify nothing is incorrect. Especially given the fun of
off-by-one issues in C we have had over the years...


greg k-h

 \ /
  Last update: 2018-09-20 15:00    [W:0.153 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site