Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9810368pxu; Tue, 29 Dec 2020 05:55:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0Z6RvRBRV+ZSAbJ84Kd8mJv44FvLmCKFFE7igWfE9zXRvG05A8soVdg3jB8WkSFh9+o87 X-Received: by 2002:a17:906:780c:: with SMTP id u12mr19858010ejm.125.1609250126138; Tue, 29 Dec 2020 05:55:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609250126; cv=none; d=google.com; s=arc-20160816; b=UPKNtpv50zrShNrt1RVw7LhTXjv72puAzfDMIWOQPNxvJ+CayRUYaG1Eoit9H7z+C2 TM0c4GnMSjh/MH0yG1A+qPldR34ThbBLfizHgvfLMgFQb/phJCiEGPUvOolVn6tEY/Dc jJkDU9sa5eVzcG/CtMEczK27LHFVP1ffWRQA9cnBHe2M4oACoj/UGa5XDnby9FC9Lyg6 l/GmhUoCtWst5EkLkJjifGLQagGOZJ1CqhdKAcii5Z1UdSpUXSVmKee7Q7+C1iOnJOhZ beTF1nb+9BYnSNvNX1KoGc0vL/UKJ0pda04CSW6Tpe8cKApnFgyupHpX5L3sD9eIyh1v 9Ffg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=e+wbicil/n3J7jbMw8wGOqmID2PV1PaWKGp+ayrLid0=; b=U0YRDRjXd4WfLVCrYWnENH/trhxujxHRK1s4KL6P3V7krp0PecFFF3eB0fHDBALlY9 n5i0N+nIoPB0lFoVZ6Kvy2UdYkhbfPwBYRMULOfF7iKnbNQUwGY3G2YoKC5SdiXANp+5 FdVgFSLTmyWYaY8bF5foKzeb1vhSt6fBTI8tSCG5/7wnc5zWJt/dT1YQ9tr9SZKXtpD0 A78vDats89mpPC3Fl+t36H1Ph8OMS01bMkq1PCQt0BVOchpzG/uVJUtXx1mDlDTejo8f GGLMri+vmJHohJcis5Z+hyH6ZwgHYPyCzZlnESIkba8Dyb4CmrS2xT64+EEB73pIgEny s3Qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pk26si18972116ejb.584.2020.12.29.05.55.04; Tue, 29 Dec 2020 05:55:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726889AbgL2NwE (ORCPT + 99 others); Tue, 29 Dec 2020 08:52:04 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:9657 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726551AbgL2NwE (ORCPT ); Tue, 29 Dec 2020 08:52:04 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4D4wm14fzQz15km9; Tue, 29 Dec 2020 21:50:25 +0800 (CST) Received: from ubuntu.network (10.175.138.68) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Tue, 29 Dec 2020 21:51:08 +0800 From: Zheng Yongjun To: , , CC: Zheng Yongjun Subject: [PATCH -next] bus: ti-sysc: Use kzalloc for allocating only one thing Date: Tue, 29 Dec 2020 21:51:47 +0800 Message-ID: <20201229135147.23593-1-zhengyongjun3@huawei.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.138.68] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kzalloc rather than kcalloc(1,...) The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Zheng Yongjun --- drivers/bus/ti-sysc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 92ecf1a78ec7..e39b6da64c6d 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -288,7 +288,7 @@ static int sysc_add_named_clock_from_child(struct sysc *ddata, * limit for clk_get(). If cl ever needs to be freed, it should be done * with clkdev_drop(). */ - cl = kcalloc(1, sizeof(*cl), GFP_KERNEL); + cl = kzalloc(sizeof(*cl), GFP_KERNEL); if (!cl) return -ENOMEM; -- 2.22.0