Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1669001rdh; Mon, 25 Sep 2023 22:55:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFm2XeTCQLx12hJBbuBV9hyMjVXqsPXwEYfBB6rglygu1JbNRgYi8AiBoUWrMgwQsx5NQc3 X-Received: by 2002:a17:90b:893:b0:268:29cf:3231 with SMTP id bj19-20020a17090b089300b0026829cf3231mr8204352pjb.3.1695707711363; Mon, 25 Sep 2023 22:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695707711; cv=none; d=google.com; s=arc-20160816; b=r39FP957ICpXDJ5wv0shrGXJoQfYkczqfMz2jeerfGSoRGShx8QMEqjnPjeQmeDQiK veJ4h0H0Dccv/ChGaC1nc9vRTZmQdG1qQSg9P+cFJdYzzvVwl/MEziEV5fgCGvEERLJk MFOwYfw27yygPEfRAqNgf25E27dUv4Mookd1XpOt7fSsAa8PL7w4FTVa9eIc7CvAIE2P zSxCp0mpyFr+kU6f3MMRVxKAj8lbFZlXdKEjnr+KmjjWjfXF16e7xQYluXUlI9c9SlyT aRuSsl7pDkZhfOP/NRPHSAX8YGZnEYdZuZ/+j4fKvLwOrzsvSI9h281zEV/eqiJ08PvV XVog== 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; bh=3dY4iQ05Jpgj0v/7/dnf9FZuuddQ+ufy0Lt0k1nc7Hs=; fh=7cKcmja+wSF156/sJzgPObjvbgYVSn97YHIMiFc8P7Y=; b=pfT/OsP/Dtq4Ue7p1b+NMmSGjby4pl6ThrkvAUfEblT2gjzuDbkMkvqHXWthyGM9vL 7if9vN+Yo29JqFtQex1pYS6v5sO5WD1cP0TEgeuy3lC1VkUH3uZzf6XncAn7bOPtAmJY zhW2ZkLFoZiYY/Xkaj26DayBwi1yXml63bvL8puemXLnMwgDVVwBUifU1dyJOw6Ne/a2 9sO9u9N/hnK+aSMiwcpr3hBEXICsgNk41CKuqw2Bfb6RUIGbKesBE8GOMoP+KLDxxClD pSY4Xc1rYDRKVEO9jjqm/DFk28eHcRzsb+v5glAiVGZtFfhW41F4oRaBEqNz72qbibRQ weHQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id c8-20020a17090abf0800b0027660aac61asi1364339pjs.114.2023.09.25.22.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 22:55:11 -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; 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=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id DE7ED81A73E8; Mon, 25 Sep 2023 22:54:46 -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 S230282AbjIZFyp (ORCPT + 99 others); Tue, 26 Sep 2023 01:54:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjIZFyo (ORCPT ); Tue, 26 Sep 2023 01:54:44 -0400 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85CEF9D; Mon, 25 Sep 2023 22:54:37 -0700 (PDT) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-692b2bdfce9so5515034b3a.3; Mon, 25 Sep 2023 22:54:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695707677; x=1696312477; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3dY4iQ05Jpgj0v/7/dnf9FZuuddQ+ufy0Lt0k1nc7Hs=; b=KPVbrQ9pQKEwSmS4LwOq2uu4Al5Y2gWeVkYjyXylE6EIU/IeghvV4HAYVvmsCeCrxH heqyFzGPD+m0gWn3APUmUaFVEzsmwXoChWQ9qlOLfNTv5M2R5ERe/jIw0MDaRgszmLMP QyrHXXuMFzQwx5dT59UoUPE0u8v7zYzWlnHJWhrER+Lizi7ZbYwEoKeofBlbTbBE9HyG 0SDz3vBxs5LrqhrNDOrSCvP52IQevGiqTufPvxP/GuNlsaNFkZx7OA9FTAFdxsjDx8O0 bz3AYZ7WwOqqY3tnwlL0FLQL9ZLYF6UXs4I6GN+9Kb0YqYMiXKs/ZR5CvdT5sgFDPe+U katg== X-Gm-Message-State: AOJu0YzNK+yc1fNunGG7YaNW0EzoyKqOZnaTy3vdQCY85irtuz8bh+t+ Uawm20k97oSggPnapbS+wRY= X-Received: by 2002:a05:6a20:918a:b0:153:5366:dec1 with SMTP id v10-20020a056a20918a00b001535366dec1mr10756399pzd.15.1695707676866; Mon, 25 Sep 2023 22:54:36 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([20.69.120.36]) by smtp.gmail.com with ESMTPSA id n6-20020a170903110600b001c60c0dbb97sm4684819plh.17.2023.09.25.22.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 22:54:36 -0700 (PDT) Date: Tue, 26 Sep 2023 05:54:34 +0000 From: Wei Liu To: Greg KH 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, wei.liu@kernel.org, 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: 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: <2023092630-masculine-clinic-19b6@gregkh> X-Spam-Status: No, score=-1.0 required=5.0 tests=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: 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, 25 Sep 2023 22:54:47 -0700 (PDT) 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. Nuno, I checked our code. We already have a misc device. We can use that for dev_* calls. Something like this: dev_warn(mshv_dev.this_device, "this is a warning message"); This should resolve Greg's concern. Thanks, Wei. > > thanks, > > greg k-h >