Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753105AbcLIUwD (ORCPT ); Fri, 9 Dec 2016 15:52:03 -0500 Received: from smtprelay0189.hostedemail.com ([216.40.44.189]:54654 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751388AbcLIUwB (ORCPT ); Fri, 9 Dec 2016 15:52:01 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:968:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1537:1566:1593:1594:1711:1714:1730:1747:1777:1792:2194:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3622:3865:3866:3867:3870:3871:3872:4321:5007:8660:10004:10400:10848:11026:11232:11473:11658:11914:12438:12740:12760:13069:13148:13230:13311:13357:13439:14659:14721:14819:21080:21212:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:20,LUA_SUMMARY:none X-HE-Tag: fall97_685d8937ad24b X-Filterd-Recvd-Size: 1333 Message-ID: <1481316716.5946.42.camel@perches.com> Subject: Re: md: Combine two kmalloc() calls into one in sb_equal() From: Joe Perches To: SF Markus Elfring Cc: linux-raid@vger.kernel.org, Shaohua Li , LKML , kernel-janitors@vger.kernel.org Date: Fri, 09 Dec 2016 12:51:56 -0800 In-Reply-To: References: <1481310314.5946.40.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.1-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 361 Lines: 7 On Fri, 2016-12-09 at 21:05 +0100, SF Markus Elfring wrote: > > tmp1 = kmemdup(sb1, MD_SB_GENERIC_CONSTANT_WORDS * sizeof(__u32), GFP_KERNEL); > > Is a function available in the Linux programming interface which would duplicate > the beginning of two array elements in a single call directly? No. If there were, there would be a good argument to remove it.