Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp297932pxb; Mon, 2 Nov 2020 22:58:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkkoj3JXPdFMccIIQmdqaqp122uaRnsSaKbiFWiNCm6qIw2P9ptKRPp3SMk09Rg1eyKHSt X-Received: by 2002:a50:decd:: with SMTP id d13mr20630617edl.202.1604386688166; Mon, 02 Nov 2020 22:58:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604386688; cv=none; d=google.com; s=arc-20160816; b=ktHJIPxCig7Dv5DIwKQKeKBzhhoGrgtMyAIag7drcDie4RI3G8r3eu6ZJy7KnWzOlO JuLX2iVQ7LJNUI4xRMInxTAoNYKvApvpxoXjCo0wKuCfmGJE2wyAaVF0cRsPtnFvJMBe KKIvHMvDjtPZiPsPrMwT7y5MnhkSIixHDjEdr35aK8/iEZzQdQoSdudcCxKSyb50UVFr fXyXuiUNVgAzQTyNGVzW/uy7VODr+NjVS51oXYgwMPINuVi4Vy6xbIhdmNUEHahctSdO PRjHT6d5k+WYKgHpwn1ArsDfDx+gsqnOqW+P+QzhgPaw1HgM399CCqMAyYgdC2X2vZuQ JW0Q== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xtrAGV4zgnu9quE4ryAJYUcFy6uOPva/+4K90X4j1JA=; b=DJQ2Ivv6N1ejre1pq+8a5cO1u4YwHyQF+ahuZ0eGbnHu8eMUvz4VbYkxtWp3EK3FX1 Ds5q+AveH3/JvebFiJXEkNowFsdE7aiJGt5Ubwxmi1HrSWnfYOnR316aBZgvWO7MzAEj swKqnsJ336eEecPgEc48XVrKsdDGM6ZYIvhIHg+upEBJZuJnbizcaavi0fh2VytaEQMv f4V9mibHumuKFSv+aK9b6OqCXUVBpFQCYEImV9DsaqwsTVtldMrQJGe3L+dcnOfQ+auF +NHgvHxDZo9ggsNo0n7fXLhKigExfmhAQ6cVVVKQJEPMYnvwMxugAGN0h2vVmq/U3zBy IzVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tJwodHqj; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si13206104edl.592.2020.11.02.22.57.46; Mon, 02 Nov 2020 22:58:08 -0800 (PST) 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=@kernel.org header.s=default header.b=tJwodHqj; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727696AbgKCGxa (ORCPT + 99 others); Tue, 3 Nov 2020 01:53:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:40216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725968AbgKCGx3 (ORCPT ); Tue, 3 Nov 2020 01:53:29 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81D5A22277; Tue, 3 Nov 2020 06:53:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604386409; bh=TfTsp0RPNPigr6kqn9/KXeoueVtBPJk6nmaLCIv3buU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tJwodHqjl5xkJspnrbJh3L94/b9mRMREC14xTIPNjm+UwCSTT83lYlgdeK1P509Wz THEWJ8ZtO4FPRjXo1f2lYpJ345v7R9LJdEY6EawOUMQsPVGXTLm5Yz1sZgIk45xB4h FyNDSlk31i83v/Ggk1kCPgQ9R5ZjH+8lc2BpemN0= Date: Tue, 3 Nov 2020 07:53:24 +0100 From: Greg KH To: christian.koenig@amd.com Cc: Alex Deucher , Deepak R Varma , David Airlie , LKML , Maling list - DRI developers , Melissa Wen , amd-gfx list , Daniel Vetter , Daniel Vetter , Alex Deucher Subject: Re: [PATCH] drm/amdgpu: do not initialise global variables to 0 or NULL Message-ID: <20201103065324.GD75930@kroah.com> References: <20201102184147.GA42288@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 02, 2020 at 09:06:21PM +0100, Christian K?nig wrote: > Am 02.11.20 um 20:43 schrieb Alex Deucher: > > On Mon, Nov 2, 2020 at 1:42 PM Deepak R Varma wrote: > > > Initializing global variable to 0 or NULL is not necessary and should > > > be avoided. Issue reported by checkpatch script as: > > > ERROR: do not initialise globals to 0 (or NULL). > > I agree that this is technically correct, but a lot of people don't > > seem to know that so we get a lot of comments about this code for the > > variables that are not explicitly set. Seems less confusing to > > initialize them even if it not necessary. I don't have a particularly > > strong opinion on it however. > > Agree with Alex. > > Especially for the module parameters we should have a explicit init value > for documentation purposes, even when it is 0. Why is this one tiny driver somehow special compared to the entire rest of the kernel? (hint, it isn't...) Please follow the normal coding style rules, there's no reason to ignore them unless you like to constantly reject patches like this that get sent to you. thnaks, greg k-h