From patchwork Tue Jun 1 00:51:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 451632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C200DC47080 for ; Tue, 1 Jun 2021 00:52:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A5F6E6135D for ; Tue, 1 Jun 2021 00:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232268AbhFAAxn (ORCPT ); Mon, 31 May 2021 20:53:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:45844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231714AbhFAAxm (ORCPT ); Mon, 31 May 2021 20:53:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 74A1F61263; Tue, 1 Jun 2021 00:52:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622508722; bh=QP6yKnzoGT0PCjP+hekaoYcOmX1Hc7jwPEsvbRqOPPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DdtfAmfgkWKifFokiGoLBYW2/VFrZt7i66X0WQctXEiXPykBxPFcSfIJUdK44J23h 1Et63P4yKjVaWhnhKtzP89mW+2G1Kakb9KOPdaIvCoZ88MCmKjTU64HhNTGfwDBjPP hMDBf+ADS+NPo/FYsqtx8J8lN5XiL/nBsHRWkOsj9sqBwIFr+P0ka5lIEHjzw68AVQ pOGJpbYGM3tWzkEyF1+gjN1dvJsSu29Tt7+N6/qECaAgSSRgnd+o/ERS1w+9WthyZY YQcaFnwQ6rwywcxwCjVkRQDabIt+DqDP1PLm9ce2BEA+iDqHG9hWvjJ7OGElFFLerf QXmxBq6w+PjLQ== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: linux-leds@vger.kernel.org Cc: netdev@vger.kernel.org, Pavel Machek , Dan Murphy , Russell King , Andrew Lunn , Matthias Schiffer , Jacek Anaszewski , Mauro Carvalho Chehab , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH leds v2 01/10] leds: trigger: netdev: don't explicitly zero kzalloced data Date: Tue, 1 Jun 2021 02:51:46 +0200 Message-Id: <20210601005155.27997-2-kabel@kernel.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210601005155.27997-1-kabel@kernel.org> References: <20210601005155.27997-1-kabel@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org The trigger_data struct is allocated with kzalloc, so we do not need to explicitly set members to zero. Signed-off-by: Marek BehĂșn Acked-by: Pavel Machek Reviewed-by: Andrew Lunn --- drivers/leds/trigger/ledtrig-netdev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/leds/trigger/ledtrig-netdev.c b/drivers/leds/trigger/ledtrig-netdev.c index d5e774d83021..4f6b73e3b491 100644 --- a/drivers/leds/trigger/ledtrig-netdev.c +++ b/drivers/leds/trigger/ledtrig-netdev.c @@ -406,12 +406,8 @@ static int netdev_trig_activate(struct led_classdev *led_cdev) INIT_DELAYED_WORK(&trigger_data->work, netdev_trig_work); trigger_data->led_cdev = led_cdev; - trigger_data->net_dev = NULL; - trigger_data->device_name[0] = 0; - trigger_data->mode = 0; atomic_set(&trigger_data->interval, msecs_to_jiffies(50)); - trigger_data->last_activity = 0; led_set_trigger_data(led_cdev, trigger_data);