Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4534826iog; Wed, 22 Jun 2022 00:10:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v6pogPTsOHje1KBd1N8SYZpi5u+boe5vBZweU9JM7TmkKqKOKdcMQNTCWbEDX6jIKDaxrQ X-Received: by 2002:a17:902:e1d1:b0:16a:239d:e6f1 with SMTP id t17-20020a170902e1d100b0016a239de6f1mr15264367pla.20.1655881809921; Wed, 22 Jun 2022 00:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655881809; cv=none; d=google.com; s=arc-20160816; b=pGtmo6QAD3MswQuVRMAtrI+36gBle+mbdJLC9CXIXN7j70DvWSQEwbqxTDtvlwvx7d o1LOPxrVNoSZxtb5jc5pKZsvMPpqnXqB6D7z+886Ym57yy4/puftn4/DaimrfCzZ38TY U5tnvc700iGqLw3eoTCjtVQaQ5fq/Z6dVv87fXpVsrj15aHEWa3/GyRHSSrtZsV3u2um b5tAONNir57T+aY2rsrj9ggVo28jscrDvTAECl3EwcJqjGTak5zzQ++xgrIsvvz3xWR5 m+j1Z4NUwOx49pt910TQm/R9FS5K1BV6uyZp7tfevrBkFJUOhKLwFkT0JeKS7W2fTpOd YaTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RBPiNQcyISwttTQVY+Lry5RGeWWVh8CPgRlZpdFpkXc=; b=cmWHCr1Oq33DwvONkrpq0rjjUNONCJoJO5XLSDgOJg4l+s0u2kkqUrbAtByQD0PAQ4 yTobR9ceXHOF8TCHrcWqkHBIftivY+svjbSmGaE+D3iNRijrf++PTh7wUdjEiAKzJMVR rhk8xpyeEJVYH8OqAOchLWdKVJF8bhgsJh4feY9z+cWkYnzTX/DBq0lLDtbvHralsaS/ SmcmHa3N6o0p4fMTl8i6LpzrsMx+pJNRlvG1lv1zQg25CKShXxH2AZd8vLQkeotA1tkG 1msgdSszlkSD/Mswvv0VZ2Holflzsd6ZaCG9a5WpUtmSQmcmvMJzNDsXjQ3UyibbxwTR rOmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DB9G13ZJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a056a000b8b00b0051964d16f32si1361565pfj.180.2022.06.22.00.09.57; Wed, 22 Jun 2022 00:10:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DB9G13ZJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351792AbiFVG67 (ORCPT + 99 others); Wed, 22 Jun 2022 02:58:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352003AbiFVG6b (ORCPT ); Wed, 22 Jun 2022 02:58:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E115C36689; Tue, 21 Jun 2022 23:58:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8F78BB81C5F; Wed, 22 Jun 2022 06:58:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57721C34114; Wed, 22 Jun 2022 06:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655881107; bh=yq7veC2Reg7jzXdI8hgrIoO435aeJmXk5Hzvc2Ci5Zw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DB9G13ZJy4dwfAw3w+Et/TS6R20KTDciEwB4sWGEzBnXgsqg29nGQD5FAYnGlWwN7 iz/K3QWvibdbzd/L9doZXZ51rYAotczCAPU8wTFkaclyx/DPaUhLsQegcHF8p25/mt MAk/TSNfi03wa8H7zGLvVMoHm1w5nwxXyI4TIZolYKao48GumM8UWLV0RPoYftwCmr YMJXwB6n5Gc66KG/EdpP+g2JMkv7mnd+Iil/XCa/GV+oqPJGBezsjaphLHgHWLVRyg CUGvXuHcCRqd3QK1qug192ZS6iFjGegMqFjIVkeDpy0+PTeVbcZFrAbVCrTIrPGs2Y SFTwc6xCqEgRQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1o3uJk-0007GC-9K; Wed, 22 Jun 2022 08:58:24 +0200 Date: Wed, 22 Jun 2022 08:58:24 +0200 From: Johan Hovold To: Slark Xiao Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] USB: serial: use kmemdup instead of kmalloc + memcpy Message-ID: References: <20220622062113.8762-1-slark_xiao@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220622062113.8762-1-slark_xiao@163.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 22, 2022 at 02:21:13PM +0800, Slark Xiao wrote: > For code neat purpose, we can use kmemdup to replace > kmalloc + memcpy. > > Signed-off-by: Slark Xiao > --- > v2: Add garmin_gps.c > --- > drivers/usb/serial/garmin_gps.c | 4 +--- > drivers/usb/serial/opticon.c | 4 +--- > drivers/usb/serial/sierra.c | 4 +--- > 3 files changed, 3 insertions(+), 9 deletions(-) Applied for -next, thanks. Johan