Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp368pxb; Mon, 2 Nov 2020 12:12:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxOnvxh+X8EA2F80GX54iW346LXwMlqzFsyP8XGowuIJPZiY137Vqm+tq0GL+JEBiHH3C4 X-Received: by 2002:a50:f61a:: with SMTP id c26mr18579779edn.324.1604347922532; Mon, 02 Nov 2020 12:12:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604347922; cv=none; d=google.com; s=arc-20160816; b=Iz/fnDQ67OKnD9FQGuzZh4IUP8p34UxIVtMiL2Aui5xtbW8mTjmaNQmeZLXBwhyBnH MzOk4qPUHr0Ax5r3pr2m96cpUsuYL26Xl2dduwdR9Iq9HZzhb/1q4LjbLH+pZqQfnSb6 2/pSrKNtaOIqg0dX0ripwpesCRHUz5hOlSGLR2dTZ/xZr13J+5xrT6KoPaq/FDjoGF1H NNgL6Eg402cXx+br8kBt9i0RPjhqZZx5aRieiF5+lhp5FGmfCPeg+/fzWC62s5HSOLhg h+IwVHigUAeEhJj00zCY60XLlEP9efIY/eLI/bgJPUD/4h9RfbpHekMO9EaaiuaeGnBE 2iyA== 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=5IpnLOkW/hgkGi2KWr8GbRbtOzsIUaVj0toZmyYSXNo=; b=Cx955Rtwys/Amklsy9vHgp85t30t9ZC15NJvJ+UEudkLevlpgFxaUBRJqfYG4BkOsu PtLm5kKCF7gI9sCbGzZFrKtIyejd9DQ1rh43Ea1SYdOhZR6aJmhwZ1Ro524P8NLWDg/f DdclZFxScpNKBUZRldTd7cr9oTcvRn26VLqgCmJbQeNrsSmN8Y1+uC5enq3r3DEDtvI8 A3Fq4jyuZHn58ddYoExMCQyPbXCF3FNJF4fczxATQFXVP0X8/SbhAP/xn4ujUpgUlykP wVEFNjGYDiXsWcVAJ0yBjObvyNMYcdqtNpFxjoSkuirTreBHRJu+pmd6ZTxYZEPeUARm it+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="V44X/eBh"; 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 q25si10122952ejd.426.2020.11.02.12.11.40; Mon, 02 Nov 2020 12:12:02 -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="V44X/eBh"; 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 S1726794AbgKBUKT (ORCPT + 99 others); Mon, 2 Nov 2020 15:10:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:51844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726723AbgKBUJr (ORCPT ); Mon, 2 Nov 2020 15:09:47 -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 9D39120870; Mon, 2 Nov 2020 20:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604347786; bh=URXjsVEknTXcprxYlN0AN65VL/Q3nRcgZdYVADBLdzw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V44X/eBh88ZcoQr0DgPwJTJa/lBENDAbD5oS9b0exdEEWilQIWEgQhwo5FTyLMMX2 +3WXD0T6quL9vrn5IytNAeZ5GZoD1tuoXn+U1QA9xjXlHPo9XR5/Zm7je3nmxxB4f6 MhwPXtf7y5xT4Pk/Zwh5sbZ28GuIxGEfNLe3S8G8= Date: Mon, 2 Nov 2020 21:10:40 +0100 From: Greg KH To: Alex Deucher Cc: Deepak R Varma , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , David Airlie , Daniel Vetter , amd-gfx list , Maling list - DRI developers , LKML , Melissa Wen , Daniel Vetter Subject: Re: [PATCH] drm/amdgpu: do not initialise global variables to 0 or NULL Message-ID: <20201102201040.GA2433494@kroah.com> References: <20201102184147.GA42288@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 02, 2020 at 02:43:45PM -0500, Alex Deucher wrote: > 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. The kernel coding style is to do it this way. You even save space and time by doing it as well :) thanks, greg k-h