From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BD43C2D0A3 for ; Tue, 3 Nov 2020 08:16:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C6A78206E3 for ; Tue, 3 Nov 2020 08:16:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="tJwodHqj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6A78206E3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F5E36EC0F; Tue, 3 Nov 2020 08:15:07 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9EA626E81D; Tue, 3 Nov 2020 06:53:29 +0000 (UTC) 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 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-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Tue, 03 Nov 2020 08:15:01 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Deepak R Varma , David Airlie , Daniel Vetter , LKML , Maling list - DRI developers , Melissa Wen , Alex Deucher , amd-gfx list , Daniel Vetter , Alex Deucher Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Mon, Nov 02, 2020 at 09:06:21PM +0100, Christian K=F6nig wrote: > Am 02.11.20 um 20:43 schrieb Alex Deucher: > > On Mon, Nov 2, 2020 at 1:42 PM Deepak R Varma wr= ote: > > > 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 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17C84C388F7 for ; Tue, 3 Nov 2020 06:53:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A2590222B9 for ; Tue, 3 Nov 2020 06:53:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="tJwodHqj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2590222B9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EF5416E81D; Tue, 3 Nov 2020 06:53:30 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9EA626E81D; Tue, 3 Nov 2020 06:53:29 +0000 (UTC) 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 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-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Deepak R Varma , David Airlie , Daniel Vetter , LKML , Maling list - DRI developers , Melissa Wen , Alex Deucher , amd-gfx list Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Nov 02, 2020 at 09:06:21PM +0100, Christian K=F6nig wrote: > Am 02.11.20 um 20:43 schrieb Alex Deucher: > > On Mon, Nov 2, 2020 at 1:42 PM Deepak R Varma wr= ote: > > > 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BA32C2D0A3 for ; Tue, 3 Nov 2020 06:53:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 278ED22277 for ; Tue, 3 Nov 2020 06:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604386411; bh=TfTsp0RPNPigr6kqn9/KXeoueVtBPJk6nmaLCIv3buU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=LR+fmUwR78SpYtoScKNW1RR2lEQcLbEhEnfyteVFN0yEvjenTqucDn9OXdS8yP8LN xGlBR1k6SDLhNZ/5aT/kckIssHxqfT0E+KsXp0b1fCQXq8kHopTSey3LkPz/nwTkZR y97HpkOitpaxxOtGuxe3nnegmNmk2/qWYp5ei0lU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727833AbgKCGxa (ORCPT ); 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