From mboxrd@z Thu Jan 1 00:00:00 1970 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=-15.2 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 31012C12002 for ; Wed, 21 Jul 2021 15:55:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19EE461242 for ; Wed, 21 Jul 2021 15:55:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239890AbhGUPOk (ORCPT ); Wed, 21 Jul 2021 11:14:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239750AbhGUPOi (ORCPT ); Wed, 21 Jul 2021 11:14:38 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C057C061575 for ; Wed, 21 Jul 2021 08:55:15 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id r21so2263890pgv.13 for ; Wed, 21 Jul 2021 08:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=AamAJMWACPXm/uhBeW58E0AsjcEWEr3w6J2GnzViHiA=; b=WB+2PJIakQlOTm9wjhPJzp8hB1utuhxsTJnRUMf3O02ShM1OHfun//a3DiSuax3Ula y4jLEgCZDspibyRcz8Th1U2MJ3praLixVFT3CM4gtQE/e5b8bl8hrd4KzY0JR5fbbiao 0MwRgc2g4gI+XmaGHpSK/NPbd/JKN1h9ADnL5X+HCuWjgLqXeTAxs0KApxmL15Fb0+8H RvdwmFJ9C8EG3ArJTTI1w7+woXXHwzHhIF4f1pPVvft5JNmh8EcjR/4W1r+E/81yZ29j 2+RkCgA+gGmn316uEu+XzZyUNU5pDxltDh7tiuBGz6IohNXsfw/RBhIkRmfnF1qCITCA k3OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=AamAJMWACPXm/uhBeW58E0AsjcEWEr3w6J2GnzViHiA=; b=Z89yWIesVlHL5UvXKXkU5FPhio/EZjOZF+8S3yWdFjtSt1/P44FoyOddXT7sA6VLio gdZw1403V8iyFpfLOtI5zDq0CMhekqZ+Jl7Fy6kn50VP06cO2J05uxFUtDEMXe18ZuHH +lnlWxHhrPxF2hyU7eTubzfMyvnwZDyIE4izBkJtZ6/4CpJpfDh/+K7ZiWEY2D+SPVh5 n1Lqd90M8Ci2pRgIx4mYqVP56Fyz811aVoYulrf/OH9GToUwng6dNjMz1wj0m06ODmhq Akxd0n/wZorGh7/bvyzJgJ27V4w92VSGyreELdsfyLK5RnFrbT5e04NRgpIiidpbqhlm DNMg== X-Gm-Message-State: AOAM5322PxGrC4fO9jVKNOsVHPlXTcozqI9pmHzBXsr+HnlWG3ZAZ1an VxRkYnzgKgrF+8MS+mSgQgleuQ== X-Google-Smtp-Source: ABdhPJwwQM3wb9won1K+8GVee0NEZPozhbd2UA018Tfv3tLtslZhN2u+D9aYesjxL2UPAAfxTRbfNQ== X-Received: by 2002:a63:ef57:: with SMTP id c23mr36356785pgk.60.1626882914844; Wed, 21 Jul 2021 08:55:14 -0700 (PDT) Received: from Shannons-MacBook-Pro.local ([50.53.47.17]) by smtp.gmail.com with ESMTPSA id r10sm26922902pff.7.2021.07.21.08.55.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Jul 2021 08:55:14 -0700 (PDT) Subject: Re: [PATCH net-next] ionic: drop useless check of PCI driver data validity To: Leon Romanovsky , "David S. Miller" , Jakub Kicinski Cc: Leon Romanovsky , drivers@pensando.io, linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <93b5b93f83fae371e53069fc27975e59de493a3b.1626861128.git.leonro@nvidia.com> From: Shannon Nelson Message-ID: Date: Wed, 21 Jul 2021 08:55:12 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <93b5b93f83fae371e53069fc27975e59de493a3b.1626861128.git.leonro@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/21/21 2:54 AM, Leon Romanovsky wrote: > From: Leon Romanovsky > > The driver core will call to .remove callback only if .probe succeeded > and it will ensure that driver data has pointer to struct ionic. > > There is no need to check it again. > > Fixes: fbfb8031533c ("ionic: Add hardware init and device commands") > Signed-off-by: Leon Romanovsky Thanks, Acked-by: Shannon Nelson > --- > drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c > index e4a5416adc80..505f605fa40b 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c > @@ -373,9 +373,6 @@ static void ionic_remove(struct pci_dev *pdev) > { > struct ionic *ionic = pci_get_drvdata(pdev); > > - if (!ionic) > - return; > - > del_timer_sync(&ionic->watchdog_timer); > > if (ionic->lif) {