Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp855042pxm; Thu, 3 Mar 2022 05:59:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/bg4yeBMseKu5GQ5Azy3s8bbU/awX6RpnwezuL5D57n7BZ2FcmhbIhbhMkhtGhg/XpwiA X-Received: by 2002:a17:907:961c:b0:6da:68a5:426e with SMTP id gb28-20020a170907961c00b006da68a5426emr6213087ejc.188.1646315965999; Thu, 03 Mar 2022 05:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646315965; cv=none; d=google.com; s=arc-20160816; b=0eXfTCSDoV48ZvmhgeM+xqvLsyjIXr5Ef5JwF5dtJFkA1o6FVU01RjFXfWoHpSces3 be0oBJhRTqfcsjnEhn4xjCAUaPWqt16vCotTpJMrFs35aC1MdQjZMV+iX10VnyuctpE6 5b9L26DWwrC2iOtVYjoTlK7jRTm+pj64aqEnl8Kpfmtt2HuHYVB1E3aYDgy7IFYf+zXB ngDmPoEIsNGyu2SJrTF9HQzISjWT9RCI4UqrfF+bNHdAtORvHAtIQtwr6okros7ix7Rr 7S6AvCd7VDVRpzGIgVmI7mShPUsqt/oVLAonHPIrvxBJzh+dVendULsOZssiZneybVtR eoiQ== 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=CvlolcbkZzsgJS/8yzn45D81aDoKRO+YPwSdXoTtLWg=; b=qoi70+0s9U0Wy1Pqbf10k3gurySxXc7EDouzz56V7ZwI1Z0mxhm6lNYEnnXCs7wGl1 RGnhTLK2n/2hLGqyykICWu0Vawf1Cwp5yPXUbtzISgcz3+dlTfDy56uHr32vGsaX94kr C4H8HNyWKBA5h9RkyrTsnnpLK0zAIwxaG4itUyTfxuVBnMB16YkR8bZONRKX5l0pUxcB M01xrTefNBEQtcCQne7gHIt/bHxjMcFoICzUMj06DM+3G5z7v6UQ3i+6ZGm8Nep9UmWe nRuoYFA6qa1Yk9jc3AZDbRflBSLqM3Mh31djcKSZkrJisk1f9ClVYfUtFOnu1dGHQi9S OarQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IwIOgjfN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i22-20020a50fd16000000b00410d579ac37si1269535eds.586.2022.03.03.05.59.00; Thu, 03 Mar 2022 05:59:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IwIOgjfN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233585AbiCCNLr (ORCPT + 99 others); Thu, 3 Mar 2022 08:11:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233524AbiCCNLp (ORCPT ); Thu, 3 Mar 2022 08:11:45 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AD4A186B8E; Thu, 3 Mar 2022 05:11:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 12BC3619E3; Thu, 3 Mar 2022 13:11:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04D2FC004E1; Thu, 3 Mar 2022 13:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646313059; bh=lSLEDv7+JFAWs47ADuLZDINgHOuHcAxjkGMi/7FoW9o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IwIOgjfNc+Rb9LdB+LeX1yze3Uhisjx9WsyrMMkjLRqMh7zXDz/roADfEgu2PPFgC 1bP/sPDvevcZuKmdATHx0PK+3T/50HA0fAUFEu5Hl26fxwn0zE8F43r9pMtGss/8dF lSDVOObtXIHO2xxAWSezC5rastWk/uQ7v1eHrJp0= Date: Thu, 3 Mar 2022 14:10:56 +0100 From: Greg KH To: Iouri Tarassov Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, spronovo@microsoft.com, spronovo@linux.microsoft.com Subject: Re: [PATCH v3 02/30] drivers: hv: dxgkrnl: Driver initialization and loading Message-ID: References: <719fe06b7cbe9ac12fa4a729e810e3383ab421c1.1646163378.git.iourit@linux.microsoft.com> <739cf89e71ff72436d7ca3f846881dfb45d07a6a.1646163378.git.iourit@linux.microsoft.com> <6b691648-96ce-f28e-436e-f5eb4137e73b@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b691648-96ce-f28e-436e-f5eb4137e73b@linux.microsoft.com> X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 02, 2022 at 03:27:56PM -0800, Iouri Tarassov wrote: > > On 3/1/2022 12:45 PM, Greg KH wrote: > > On Tue, Mar 01, 2022 at 11:45:49AM -0800, Iouri Tarassov wrote: > > > - Create skeleton and add basic functionality for the > > > hyper-v compute device driver (dxgkrnl). > > > > > > + > > > +#undef pr_fmt > > > +#define pr_fmt(fmt) "dxgk: " fmt > > > > Use the dev_*() print functions, you are a driver, and you always have a > > pointer to a struct device. There's no need to ever call pr_*(). > > > > There is no struct device during module initialization until the > /dev/dxg device is created. Then you should not have anything to print out. > Is it ok to use pr_* functions in this case? Nope. > Should dev_*(NULL,...) be used? No, not at all, never! > I see other drivers use the pr_* functions in this case (mips.c as an > example). There are lots of bad examples in the kernel tree, let's make your code a good one. thanks, greg k-h