Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp839095pxk; Wed, 23 Sep 2020 18:33:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwREGzIWt9DceggN0XkPTZXyu6wVrl0XTqePW2IB1B6mAIgnJvQYmUzUqGVLkWgpDe1M/TQ X-Received: by 2002:aa7:da42:: with SMTP id w2mr2079590eds.287.1600911186614; Wed, 23 Sep 2020 18:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600911186; cv=none; d=google.com; s=arc-20160816; b=fFtdBNTV9X5SBu10Q1/G7AGK8Dwn25y3lI1B2YZ2Q/EAoTHagWGHrfu2DdDRnqm1h1 nuGKafQFyOCDqOVvUIo2Z+DAl8Fm5sNP3GIglIhsY//AHcJ4hGD0McnxKoDIeECG0sR7 PC7y9z92hcfRvSwep8eSuEpmovk0nepNQERWGPvOGFGApamwThazK2BXj5PJiFLfctUM 5I8h/7zwy7EFB3+/rXAl4Ft3MOh8nrBUg+JNWfRWOgCZ1twEL1oAti/6WeA71K+TzXcv OGsOIIthUUHEXGRk3FVaWzhGmItEYoFmnUUT2ODEn9n+0PgxcJfz1v8i2hRBE0v2MHUz 9FXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=cK1MHKRYrqYjskSliGEjt6+mSN57/qpKSAsstsuFM24=; b=av7fZc7CGgrj4taRz6+Lxfv/GSgPrBfv/xXtxh5pQlnwfmTQIVUXKeS7ms2Jmjg3ju FVpfpxRmurHCbnuHPToEYiuQXfXLNExAVfrq3QD3YVUPchJFwdIcWkQD2/z5ikBdy/9W UFF9Jb5LIDY0mP5pjNmwHho28BaKeIFrNQ8vbyDCE9nShxRwnXF/L9IKyfuAW+ob0JW5 x0oRtpmlnJMcYv/+RdtvtiTSAWXaZ6fdNfd9TvZXugmyVxwcEHjn2Dydwnkfd+I9EO+F D0UZv7GKxvITDu8/Iof8FlUZo5XKonh09BOvKi2sVPgaex3n2W5RJYZaUYxvjoG5SK2b NUkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="rD//kS7I"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si1109616eds.157.2020.09.23.18.32.42; Wed, 23 Sep 2020 18:33:06 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="rD//kS7I"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726497AbgIXBbg (ORCPT + 99 others); Wed, 23 Sep 2020 21:31:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbgIXBbf (ORCPT ); Wed, 23 Sep 2020 21:31:35 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBC82C0613D1; Wed, 23 Sep 2020 18:31:35 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id j7so727170plk.11; Wed, 23 Sep 2020 18:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=cK1MHKRYrqYjskSliGEjt6+mSN57/qpKSAsstsuFM24=; b=rD//kS7IeFXd9hF2ed31+EIcIBuTITtO+mRjbhaDBwM4TAXB0MI0PKGGSXDx1NHoJi kcOOEkJ60oO7Hzpbqfnj8g1YCXDxXqBevUzyD/RH8Q9CmarGXcgY4Evj9girgOhSr6Ae cyj09ChE8znNk4N8Qx3oHOIGLbK9ZQmLFOsQmjmWA8xzAgaHD1EQomrQNEe/LzV8HTLB NiuM3k2PY+SbIoR/qPP7UM1YKZE5M5pZOcm5sOSKCmWRq0pEh/k1YXgyDMcEA/oqGI1G kdiHDoUHXryUR8fUp0hGA/F6XqxAC7//3HTxc1oN4f80mtMCIj+xlq7h1DHVIKu4g18E iEgQ== 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=cK1MHKRYrqYjskSliGEjt6+mSN57/qpKSAsstsuFM24=; b=PJc2groKBtUQ1GBTbTYylG5ie3Ayl3TjsFTzo2FQHt1l7dXARd4WEzxMwV56yXMwjW o/lQ4Bh1tuTbsIixDeii2Ypke4BZNy7SQ/9kGEaMoBTj9oXuiVvFex2rSYPPGz9HVN8B cR8lv+qneTxP7XkSxKMbFSegz2hrzyVJF7xOBBrqxFkJaUXaT2IWB8u3CkRet071KP2/ gd4ATsnrqIOyiydDhaJzbIXebVCsxAUelsVI1WA/Wuu7mPs22S3nWv1UHfbwIOlFCE/c Rd4nHNFxkQFQEGY72SzsWKhfu0oYxGd1FecE4Sb9TfOY7qk5/x07wsBOMlm7Hbyq8qPp l7Rg== X-Gm-Message-State: AOAM531lQ6IdfW7UbK5sdcnL+FLnW0NbjMUCI8foe7iwUei4Fx/of23M 7/Vd1vIsRYovNLjD4SkEh4kVynA8m0A= X-Received: by 2002:a17:902:16b:b029:d2:565e:a70b with SMTP id 98-20020a170902016bb02900d2565ea70bmr2427614plb.42.1600911095117; Wed, 23 Sep 2020 18:31:35 -0700 (PDT) Received: from [130.216.45.21] (nmr1-400i.che.auckland.ac.nz. [130.216.45.21]) by smtp.gmail.com with ESMTPSA id k4sm849011pfp.189.2020.09.23.18.31.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2020 18:31:34 -0700 (PDT) Subject: Re: [PATCH v2] ide/macide: Convert Mac IDE driver to platform driver To: Finn Thain , Geert Uytterhoeven Cc: "David S. Miller" , Bartlomiej Zolnierkiewicz , Joshua Thompson , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org References: <3cf40b9df80a99a3eee6d3af79437016038f0a44.1600051331.git.fthain@telegraphics.com.au> From: Michael Schmitz Message-ID: <1ae450be-0c26-f9e3-1544-3b58dbbf7e53@gmail.com> Date: Thu, 24 Sep 2020 13:29:21 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Finn, On 24/09/20 1:07 PM, Finn Thain wrote: > Looking further at the drivers using ide_host_register(), I see that > falconide.c is missing a set_drvdata() call, while tx4939ide.c calls > set_drvdata() after ide_host_register(). The latter example is not a bug. > > The pattern I used, that is, calling set_drvdata() after ide_host_add(), > is actually more popular among IDE drivers than the pattern you suggested, > that is, set_drvdata() followed by ide_host_register(). Either way, I > don't see any bugs besides the one in falconide.c. > > Regarding falconide.c, my inclination is to send a fix following the more > common pattern (among IDE drivers), as below. I guess that may prompt the > subsystem maintainers to make known their views on the style question. Please do - that is clearly a bug. I must admit I never tried to boot my Falcon off a SCSI partition to test falconide module unload. Cheers,     Michael > > diff --git a/drivers/ide/falconide.c b/drivers/ide/falconide.c > index dbeb2605e5f6e..607c44bc50f1b 100644 > --- a/drivers/ide/falconide.c > +++ b/drivers/ide/falconide.c > @@ -166,6 +166,7 @@ static int __init falconide_init(struct platform_device *pdev) > if (rc) > goto err_free; > > + platform_set_drvdata(pdev, host); > return 0; > err_free: > ide_host_free(host); > @@ -176,7 +177,7 @@ static int __init falconide_init(struct platform_device *pdev) > > static int falconide_remove(struct platform_device *pdev) > { > - struct ide_host *host = dev_get_drvdata(&pdev->dev); > + struct ide_host *host = platform_get_drvdata(pdev); > > ide_host_remove(host); >