Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp205842pxy; Wed, 21 Apr 2021 23:36:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdTLVETnq35EG51uHCqU1aXlVt7Y+ktMHv146dcO7ziXsoLJNou2Gr05EXWbbGo9H7JRo4 X-Received: by 2002:a63:5112:: with SMTP id f18mr1953210pgb.379.1619073376233; Wed, 21 Apr 2021 23:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619073376; cv=none; d=google.com; s=arc-20160816; b=LMVDK5S9xkTD21iwPOLxa6iVwqpF4Em/GnKthScrvCMwqwlgiv7SKIkFURjZFUzgqH deKQWXZnLT8A3/XyOEPD0z4sKCE6m+sjVmdHbL2AZgFZPphfRsWknRqDw3Npdw0ZdLq5 oUgSHEdEnxkZ7ll3asa4753jCffD1eFEEP0MB38WOiDLkEzGBPtuwxhi2VaqPdHE/br+ GBInZLAsaWIdLT1Xp5ibxDGxVRrPF21rYa420yfpB5Z3BE5Tbw3bGzEnwwajOCsMLmby 25/4AdSFOmKKZzjz2v52m/rOcMeJ3iRZZqCmuAhhDMpwdNlLyhfrDgjWjP0Us2U7HryF c+wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=0z5ImEcxsoG30pm6Oe1GxwLpNovH9t72xk62XiWWAE8=; b=w0AhNzMthnFm20L62C12BmrKVWM22+W7/29/TfkxYTfvubqKfOwrp8QbBJKgPFaTs5 QEQgVJJdGw0O6ZQl0g2LLITL8KGjaohBU2umlkbapCklM4ul7qfMYJ6phpwi7u2UlY5q LnGi8c+3HqIo/qU8UGEI/EWmF9xgOlbCWl8nooQViAmIarT3WEdmLijd2D3OcONaTGmV lQkQRsEQhXKWobisno+nWgtzSW242p2njlanzOPorigEcwn58MQ7FjQnFxX4eqXOk5Fg +4yAJqAzB3mk4RLBHe96MqdQNizc0bhVcWye57jFfMSHOlYOY4jlfLVF3B/jaocJqDj6 Dpxg== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 10si2113854pgk.571.2021.04.21.23.36.04; Wed, 21 Apr 2021 23:36:16 -0700 (PDT) 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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234890AbhDVGfd (ORCPT + 99 others); Thu, 22 Apr 2021 02:35:33 -0400 Received: from mga05.intel.com ([192.55.52.43]:7070 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbhDVGfd (ORCPT ); Thu, 22 Apr 2021 02:35:33 -0400 IronPort-SDR: +wiVnhqi3qWiQpkMQRa6OnEdSRjlXeMCw/bs+ArZELeQvzxf2bi4+p4ICZ54RVGDW0Qh/g4Oux nZB1SBaM85iA== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="281164951" X-IronPort-AV: E=Sophos;i="5.82,241,1613462400"; d="scan'208";a="281164951" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 23:34:58 -0700 IronPort-SDR: N/VdHPgKMmnCktx4S1kk0xv2cVIku/kjvc542q4RO5SjiE13e4jhIuMmjIFzPAycFgCO8IQ/Tx lru/cqQLORNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,241,1613462400"; d="scan'208";a="453172193" Received: from um.fi.intel.com (HELO um) ([10.237.72.62]) by FMSMGA003.fm.intel.com with ESMTP; 21 Apr 2021 23:34:56 -0700 From: Alexander Shishkin To: Yu Kuai , mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com Cc: linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com, zhangxiaoxu5@huawei.com, alexander.shishkin@linux.intel.com Subject: Re: [PATCH] stm class: initialize static variable in declaration In-Reply-To: <20210407125358.4135345-1-yukuai3@huawei.com> References: <20210407125358.4135345-1-yukuai3@huawei.com> Date: Thu, 22 Apr 2021 09:34:55 +0300 Message-ID: <87o8e6esj4.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yu Kuai writes: > mutex lock can be initialized automatically with DEFINE_MUTEX() > rather than explicitly calling mutex_init(). > > list head can be initialized automatically with LIST_HEAD() rather > than explicitly calling INIT_LIST_HEAD(). > > srcu_struct can be initialized automatically with DEFINE_STATIC_SRCU() > rather than explicitly calling init_srcu_struct(). What's missing is the "why". We can do these or we can keep them as they are. Each choice has impact on .text/.data, for instance. Why is one preferred over the other? Each patch should contain some form of analysis that shows that the author thought about why they made the patch in the first place. And please learn not to spam the STMicro people with patches for System Trace Module. Sometimes the same acronym can mean multiple different things. This is another sign that the patch author spent zero time getting to know the code that they are patching. Regards, -- Alex