Message ID | 20231016133135.1203643-4-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3462944vqb; Mon, 16 Oct 2023 06:32:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0XaTLFWpXtivmessgvaCkSjU5tIt6Be1PS6lxVySDlZhuvDeQJbKyJ2G1JO1Wbu3YdYTg X-Received: by 2002:a05:6602:2a44:b0:792:9b50:3c3d with SMTP id k4-20020a0566022a4400b007929b503c3dmr42093201iov.1.1697463154787; Mon, 16 Oct 2023 06:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697463154; cv=none; d=google.com; s=arc-20160816; b=eONx3K1JYsVLML3cJrJ8QguXF6eiI/cb0gQ5Q5XXm2JcJZbNra3rJ1KkEhvN9forJr vIUg8Kl2TqZsaC+eKmPWtBLGnDwc5TM7SXiwVSfcss36vlZ48xUJW+dfOWhJqHXkUfzs 0lTNlpgVoTF6tUSxKPvDCpPfZCmy1yqo363SCBpAx8aTPteNkyARSGWUITZ6LniIA5KU OVOFD0s0o8XJ+OtlthUaITDTc7wTEhL/NqtHaTDzZLuufZESBNoN77tq3E6UpihWPare /Mpn7yf95dXkqf/dziYNlypVKRtHgevfyRqL79BrJIpfGCDqlQ8sOse+9qB8akPIoVW1 5mXA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OfJ44MLqQGAMiJh1/T4KhpBe1qm9TWK7F+GIsy9rZK4=; fh=2JBUIg4Hm6CI5OqXiiVJ9qu0u244D7Du+J73tUUcI/M=; b=PlkDawEiFOQbMsB+P3ldWvL0g8uPwOpgL9oqX98H1Am2fqIexXXnGC2wJWyRHfmILm w0pL4UWX+DpaF9wQJTg2Sc+fMtkGPO/6zeQX33pGGNfCizcIF8RZVh1KoR3eDeELMS6b JTn/eohoukV2sy5gI6NAfHtwEG3xUNLkVOcSEJkfEFkvUAEpHj8Nj7LuP1dQCSP/amI1 2U9BkBV0S6y3Wtql2rKRPWXbZXPU3922iMkRjrOVH8nG3AgqJX9PkOXAxRoZMhg+K1Qj /lOaxmcpsmaOtECTP/HzWN30Ee0wbqAU8ChpZ8C19pOy683YUPT8lT1gZ1rnpW4WXLN2 Aduw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FICsEJgp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id b9-20020a63d809000000b005637962e15esi10423950pgh.603.2023.10.16.06.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 06:32:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FICsEJgp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 445EA804AD82; Mon, 16 Oct 2023 06:32:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233631AbjJPNcA (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 09:32:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233685AbjJPNbt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 09:31:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2617181 for <linux-kernel@vger.kernel.org>; Mon, 16 Oct 2023 06:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697463102; x=1728999102; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cdkuTO8u3rbVQRk8x8e3eLaDQYXu7b3sptU0SE6tXHc=; b=FICsEJgp9MRABfRfCapKVMFU7ahAwT4XPR+8WonqNzRaGtfDVZkzgsmc I6uLsKJ6xn88RIfYqLP/e6HR0lUaoGqGkaKcPq8zARkn6p1ptI6Cjt0N9 Dgstcq2YqHcp5AB6OfIaYR0U0IMoymIxEot7TejeqUnQWXcUWVHC6/LCn WEVvsWJcmKKSofYPpEVdyF3UNqPLulHeRmGI6vpM2p7V7djBpBeKtCkdZ zzbCKAysFDhhvuVeayUQ+pYdT2uzZbozuXj0SaH2pRdyZ7u0dwbths89u ++CAEWP4vZfa1MHDYUDEDJTKhkJUUYMhbexoYEy9lndiwubfS0+BdGJpJ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="375892095" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="375892095" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2023 06:31:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="1002934885" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="1002934885" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 16 Oct 2023 06:31:38 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5BF63385; Mon, 16 Oct 2023 16:31:37 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Luis Chamberlain <mcgrof@kernel.org>, Joel Granados <j.granados@samsung.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, linux-kernel@vger.kernel.org Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Subject: [resend, PATCH v1 3/3] parport: Drop unneeded NULL or 0 assignments Date: Mon, 16 Oct 2023 16:31:35 +0300 Message-Id: <20231016133135.1203643-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20231016133135.1203643-1-andriy.shevchenko@linux.intel.com> References: <20231016133135.1203643-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 16 Oct 2023 06:32:30 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779919125411641994 X-GMAIL-MSGID: 1779919125411641994 |
Series |
parport: Switch to some modern APIs
|
|
Commit Message
Andy Shevchenko
Oct. 16, 2023, 1:31 p.m. UTC
kzalloc() gives us a zeroed memory, no need to explicitly assing 0 or
NULL or similar to the members of the data structure that has been
allocated with the above mentioned API.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/parport/share.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/parport/share.c b/drivers/parport/share.c index 38780f6a9119..a9a9cb0477ea 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c @@ -449,13 +449,9 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma, tmp->irq = irq; tmp->dma = dma; tmp->muxport = tmp->daisy = tmp->muxsel = -1; - tmp->modes = 0; INIT_LIST_HEAD(&tmp->list); - tmp->devices = tmp->cad = NULL; - tmp->flags = 0; tmp->ops = ops; tmp->physport = tmp; - memset(tmp->probe_info, 0, 5 * sizeof(struct parport_device_info)); rwlock_init(&tmp->cad_lock); spin_lock_init(&tmp->waitlist_lock); spin_lock_init(&tmp->pardevice_lock);