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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50826C433EF for ; Thu, 14 Oct 2021 14:01:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32E13610D0 for ; Thu, 14 Oct 2021 14:01:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231740AbhJNOD3 (ORCPT ); Thu, 14 Oct 2021 10:03:29 -0400 Received: from mga11.intel.com ([192.55.52.93]:33309 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbhJNOD1 (ORCPT ); Thu, 14 Oct 2021 10:03:27 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="225139063" X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="225139063" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 07:01:22 -0700 X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="563769819" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.159]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 07:01:20 -0700 Received: from andy by smile with local (Exim 4.95) (envelope-from ) id 1mb46M-000E6j-Hi; Thu, 14 Oct 2021 20:01:06 +0300 Date: Thu, 14 Oct 2021 20:01:06 +0300 From: Andy Shevchenko To: Yang Yingliang Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, lars@metafoo.de, jic23@kernel.org, hdegoede@redhat.com, ddvlad@gmail.com Subject: Re: [PATCH] iio: accel: kxcjk-1013: Fix possible memory leak in probe and remove Message-ID: References: <20211014035338.3750416-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Thu, Oct 14, 2021 at 09:38:52PM +0800, Yang Yingliang wrote: > On 2021/10/14 22:54, Andy Shevchenko wrote: > > On Thu, Oct 14, 2021 at 11:53:38AM +0800, Yang Yingliang wrote: > > > When ACPI type is ACPI_SMO8500, the data->dready_trig will not be set, the > > > memory allocated by iio_triggered_buffer_setup() will not be freed, and cause > > > memory leak as follows: > > It seems it's not first time I'm telling you to shrink the noise in the commit > > message. Can you please LEARN this once and forever? > Thanks for you advice, I searched the whole kernel source tree commit > message to > learn how to make the memory leak report, I found most of them using the > whole > backtrace, so I make the report like they did in this patch. Some maintainers do not care about bloated sizes of the commit messages, however there are several advantages to have them shorter: 1/ saving resources (followed by disk storages and energy around the world, means being environment friendly for real); 2/ when reading log, noise make it much harder to understand, besides the fact that reading itself will be time consuming; 3/ nowadays some people are tending to read or even discuss the changes on the mobile devices, where screen size is not so big; 4/ the copied'n'pasted backtrace means that the contributor probably haven't thought through it and the quality of the change is in doubt. > I will shrink > the noise in v2. > How about shrink it like this: Much better! -- With Best Regards, Andy Shevchenko