Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1633820

Re: sun50i-a64-pinctrl WARN_ON drivers/base/dd.c:349

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: sun50i-a64-pinctrl WARN_ON drivers/base/dd.c:349
Date Mon, 01 May 2017 21:30:02 +0200
Message-ID <tCpbb-4FA-1@gated-at.bofh.it> (permalink)
References <tls5r-7wD-7@gated-at.bofh.it> <tm0Tv-7D7-11@gated-at.bofh.it> <tm1my-7VB-27@gated-at.bofh.it> <tm1my-7VB-25@gated-at.bofh.it> <trXzz-7sc-7@gated-at.bofh.it> <txvKi-3lc-15@gated-at.bofh.it> <txxsK-4oB-21@gated-at.bofh.it> <tBmfn-5oV-1@gated-at.bofh.it> <tBIfU-2Xk-7@gated-at.bofh.it> <tBK82-46a-1@gated-at.bofh.it>
X-Original-To André Przywara <andre.przywara@arm.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=mf8DaLxnAU+DXGrgGPFF7tdSKCRE1M94nw9h/Fa3zs4=; b=WL/wyuSe8tlUaIWi2PRHZHndhoG5HSc/TjttX87iL9YQbRSMzoGwy5v+KDvQxyJYDg BFqLdPLaFiDOYiMoJ5kH4opueATgrlTaOYfPOmLlR47BsaOrZlvlJpiadBABGPEHH/zz KCVOmEhWaunrSWRiLIR7ceEqV9stVtlEK+IhIQpIpm09yIllG8myZ7lKBQXldtGdMnrM O2XKWzCMHCX421M1GUe32LKDWRNQcEcoi7HuiUyKikflDei2h3t4AcHxOIHygrysPjz+ D279XLj86ay0CUo66rpH14cNU62Q+RwAetxJqy/wQbCAS/xibeTCmtITVZKa7FiRJTen R9CA==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=mf8DaLxnAU+DXGrgGPFF7tdSKCRE1M94nw9h/Fa3zs4=; b=Nfvwe8Q2brJrvnw9FxuHjKb+5eRk0z9dEqTpNku+SEuu3sKsB3FD9ig3zlj+++r58W 0DJM+eQ3ikq3k8NZKigMgdUyeMT4kUD59yI7n4uHaU/JL4EkjTIhtQleioF+MCzqZ0ke 0ZpDR3YqJ/5aXFf8TlWg4acdr4aGGn7FAJvYqXvAT7i0hNGJFDImY11KOLLpeSGIo/oa eeIYwprHwZx49srC/z7nAAXUaGdqEObIzm2hyWpbF4Gs6+bNJ28X4r0IHa3vaWC+gYOD Wj3wzKnsdR0Y6s0ZXpqPmjSdnpJswsc6t0t8k7Um48lSp3T2k/yJyLbvSrZrA9OC6U4I jVyQ==
X-Gm-Message-State AN3rC/5ARue0h+wRiK7EgCjwUTHPcGAJBLDXbNtoqh/no2z8ckk8MPfy axJhVGNEZ7vVQtcjvts=
X-Received by 10.13.241.129 with SMTP id a123mr20919035ywf.175.1493666524207; Mon, 01 May 2017 12:22:04 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Disposition inline
Content-Transfer-Encoding 8bit
User-Agent Mutt/1.8.0 (2017-02-23)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 24
Organization linux.* mail to news gateway
X-Original-Cc Adam Borowski <kilobyte@angband.pl>, Icenowy Zheng <icenowy@aosc.xyz>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
X-Original-Date Mon, 1 May 2017 15:22:02 -0400
X-Original-Message-ID <20170501192202.GE8921@htj.duckdns.org>
X-Original-References <20170316010615.GA23552@kroah.com> <20170317140812.GB5078@htj.duckdns.org> <785901489760914@web50g.yandex.ru> <20170317144422.GD5078@htj.duckdns.org> <3cf02066-ca0e-05f4-6a3d-ebc6d5373caf@arm.com> <20170418072505.GE3899@wtj.duckdns.org> <3fda46eb-7fcc-4c27-98b6-7d822cce1405@arm.com> <20170428220314.GI22354@htj.duckdns.org> <20170429212857.tvdsxi4tlft3mdpj@angband.pl> <043dc68f-aaec-48e8-4a92-e57d60a8ed08@arm.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1633820

Show key headers only | View raw


Hello,

On Sun, Apr 30, 2017 at 12:34:40AM +0100, André Przywara wrote:
> >> If this is a valid use case, we can change devm to repeat till empty
> >> but it's a weird thing to do to allocate from a release function.
> >>
> >> So, something like this.  Only compile tested.
> 
> I was wondering if using devm_*alloc in a _release_ function is valid at
> all, given that it is called as part of the DEFER clean-up routine.
> Looking at pinmux_generic_free_functions() it looks like we could
> replace it with a (non-devm_) kmalloc version and it would still work
> (given we add a kfree at the end).
> Either that or we bail out early if pctldev->num_functions is zero.

I was just throwing the idea but the more I think about it, the less
sense it makes to me.  So, I really think this should be fixed by
dropping dev_kzalloc() call from the release function.  It makes no
sense.

Thanks.

-- 
tejun

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: sun50i-a64-pinctrl WARN_ON drivers/base/dd.c:349 Tejun Heo <tj@kernel.org> - 2017-04-29 00:10 +0200
  Re: sun50i-a64-pinctrl WARN_ON drivers/base/dd.c:349 André Przywara <andre.przywara@arm.com> - 2017-04-30 01:40 +0200
    Re: sun50i-a64-pinctrl WARN_ON drivers/base/dd.c:349 Tejun Heo <tj@kernel.org> - 2017-05-01 21:30 +0200

csiph-web