Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1714268rdh; Tue, 26 Sep 2023 00:51:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFky25T1tEg7U8PZ8EYQYLHF65Au2tBCXkvnLZO0cefiZCdo6GJTFakNkaMSpoNfs/QMKbB X-Received: by 2002:a17:903:32c7:b0:1c3:f764:8428 with SMTP id i7-20020a17090332c700b001c3f7648428mr8939446plr.0.1695714693180; Tue, 26 Sep 2023 00:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695714693; cv=none; d=google.com; s=arc-20160816; b=top7UTuc8p+cNyw6InQHa/bg86jN47FLSWBy/LXrtWROIX73MUPeEe7cQA9y0gdAeh rbnMhzMDXxV4PxwXP+prY9P5bpJnK/KXm0huEgaIuq/BAwNoTd9sDl+xpQ+uUty4W4xi imxrC+sQlSW0cM1F4vy1G7j8cXB778qIaePyGVt9TVpAcfvdCv23JSgTBMALVfi0vZZA ZhDu7Y3ymKHbvxyihOdHivroIMT1/87maZb5ZcwC4M4rwuBv85ZNGrwtnMt3mw/PTwuF WygEGs9VTVQur/UJojBysSmi6bznd9dlUR5mcEVgA4AlonFyxPDknai3vCkIhgjyOtcy Udhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=92rWwQYz5kFMmVRSyYkkmuldhHwHq4a2WYmFmcAPd7k=; fh=IoyuW1MdpAH/ckqYJDA59MiNzAXOSnj+fQjbVLQI568=; b=bh1wM3yusj6LyJQtrqrymSlC8zJKgUkOzB5lUXcIc2HTch51y4INTXr/QJryGcE328 ojy25wkUgnlST3pAWLdZdynTPCaA6zxRDjYkA+RG/RSAHyLWBYriC99V+GgzpGODRbXz p66MH/t9fSgAgFgqE+KXeRAdVWWp/Ht4j0gQPnCwoR+KQkbtFVBr4YY6UBMclcVCdRZk jKvvw5sfyYzodLXEXDV3Hi+MdyiwxiqlyndNGQ5s7EmGh8QjbBO5OpggY/2Dk+OlVeps 4IB4Ons+eDNKQIFXYLAUFYzVHDPYryiLx9CdcW1oTKpkR5Lg9TkIMw37q9Z8L8wGCfSa EBiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NUNdNSC2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id be8-20020a170902aa0800b001bdd58f685fsi11099272plb.85.2023.09.26.00.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 00:51:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NUNdNSC2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 213C1801B1AC; Mon, 25 Sep 2023 23:31:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233764AbjIZGbR (ORCPT + 99 others); Tue, 26 Sep 2023 02:31:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233747AbjIZGbQ (ORCPT ); Tue, 26 Sep 2023 02:31:16 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72E36F3; Mon, 25 Sep 2023 23:31:06 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95B88C433C7; Tue, 26 Sep 2023 06:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695709866; bh=zTaUbCWNmUZ8OqLFafBNMG+qzSrLIujE0F+gyn3vzlQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NUNdNSC2HbBJlNxtjhT2Tyvv/GHWKXVtsgnABl9D2Y1b7abCbfZf8vsiTh2BFjFRr 8BAolH0Hw0lLTPRWRgo9iWHmeavC6cw7MvgQj5ESmLqCtiyts0eLxcXcIirODiomix t+wmDtuxIbJBUS0D7YiDAo1nBg0G20LQPvLp4NEo= Date: Tue, 26 Sep 2023 08:31:03 +0200 From: Greg KH To: Wei Liu Cc: Nuno Das Neves , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, patches@lists.linux.dev, mikelley@microsoft.com, kys@microsoft.com, haiyangz@microsoft.com, decui@microsoft.com, apais@linux.microsoft.com, Tianyu.Lan@microsoft.com, ssengar@linux.microsoft.com, mukeshrathor@microsoft.com, stanislav.kinsburskiy@gmail.com, jinankjain@linux.microsoft.com, vkuznets@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, will@kernel.org, catalin.marinas@arm.com Subject: Re: [PATCH v3 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V Message-ID: <2023092614-tummy-dwelling-7063@gregkh> References: <1695407915-12216-1-git-send-email-nunodasneves@linux.microsoft.com> <1695407915-12216-16-git-send-email-nunodasneves@linux.microsoft.com> <2023092342-staunch-chafe-1598@gregkh> <2023092630-masculine-clinic-19b6@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 25 Sep 2023 23:31:29 -0700 (PDT) On Tue, Sep 26, 2023 at 05:54:34AM +0000, Wei Liu wrote: > On Tue, Sep 26, 2023 at 06:52:46AM +0200, Greg KH wrote: > > On Mon, Sep 25, 2023 at 05:07:24PM -0700, Nuno Das Neves wrote: > > > On 9/23/2023 12:58 AM, Greg KH wrote: > > > > Also, drivers should never call pr_*() calls, always use the proper > > > > dev_*() calls instead. > > > > > > > > > > We only use struct device in one place in this driver, I think that is the > > > only place it makes sense to use dev_*() over pr_*() calls. > > > > Then the driver needs to be fixed to use struct device properly so that > > you do have access to it when you want to print messages. That's a > > valid reason to pass around your device structure when needed. > > Greg, ACRN and Nitro drivers do not pass around the device structure. > Instead, they rely on a global struct device. We can follow the same. A single global struct device is wrong, please don't do that. Don't copy bad design patterns from other drivers, be better :) thanks, greg k-h