From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751485AbdI1EgU (ORCPT ); Thu, 28 Sep 2017 00:36:20 -0400 Received: from regular1.263xmail.com ([211.150.99.136]:48921 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750775AbdI1EgT (ORCPT ); Thu, 28 Sep 2017 00:36:19 -0400 X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: tglx@linutronix.de X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <09b414c394af380c8824737554268cdc> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <59CC7C35.1040409@rock-chips.com> Date: Thu, 28 Sep 2017 12:36:05 +0800 From: jeffy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20130126 Thunderbird/19.0 MIME-Version: 1.0 To: Thomas Gleixner CC: linux-kernel@vger.kernel.org Subject: Re: [PATCH] irq/generic-chip: Fix memory leak of domain->name References: <20170927122816.18931-1-jeffy.chen@rock-chips.com> <59CC6A16.9030201@rock-chips.com> In-Reply-To: <59CC6A16.9030201@rock-chips.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On 09/28/2017 11:18 AM, jeffy wrote: >> >> I don't think that this is the proper thing to do. There is no reason why >> the domain should have the same name as the irq chip. So we rather should >> do: >> >> if (!d->name) >> d->name = name; >> >> Along with a proper comment. > that is better, will do it in next version :) it looks like the __irq_domain_add() would guarantee every domain has a valid name, maybe we can just remove this?