Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754872AbdDDTLT (ORCPT ); Tue, 4 Apr 2017 15:11:19 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46706 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754468AbdDDTLR (ORCPT ); Tue, 4 Apr 2017 15:11:17 -0400 Subject: Re: [PATCH v4 19/23] drivers/fsi: Add GPIO based FSI master (fwd) To: Julia Lawall References: Cc: joel@jms.id.au, linux-kernel@vger.kernel.org, andrew@aj.id.au, alistair@popple.id.au, benh@kernel.crashing.org, "Edward A . James" , Jeremy Kerr , robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, rostedt@goodmis.org, mingo@redhat.com, gregkh@linuxfoundation.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kbuild-all@01.org From: Christopher Bostic Date: Tue, 4 Apr 2017 14:10:59 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17040419-0020-0000-0000-00000BB2AF37 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006882; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00843081; UDB=6.00415359; IPR=6.00621256; BA=6.00005266; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014911; XFM=3.00000013; UTC=2017-04-04 19:11:15 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17040419-0021-0000-0000-00005B66C72B Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-04_17:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704040163 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2979 Lines: 68 On 3/30/17 4:39 PM, Julia Lawall wrote: > Is master on line 514 allocated with kmalloc, or the devm call on line > 522? Hi Julia, Its allocated with the devm call on line 522. The kfree on line 514 wouldn't be necessary in that case - will remove. Thanks for pointing that out. Chris > julia > > ---------- Forwarded message ---------- > Date: Fri, 31 Mar 2017 00:15:09 +0800 > From: kbuild test robot > To: kbuild@01.org > Cc: Julia Lawall > Subject: Re: [PATCH v4 19/23] drivers/fsi: Add GPIO based FSI master > > Hi Chris, > > [auto build test WARNING on linus/master] > [also build test WARNING on v4.11-rc4 next-20170330] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Christopher-Bostic/FSI-device-driver-implementation/20170330-184914 > :::::: branch date: 5 hours ago > :::::: commit date: 5 hours ago > >>> drivers/fsi/fsi-master-gpio.c:514:1-6: WARNING: invalid free of devm_ allocated data > git remote add linux-review https://github.com/0day-ci/linux > git remote update linux-review > git checkout f4bd3b6a41c7a59e9ce2e65947a4d3dfc2ee4a29 > vim +514 drivers/fsi/fsi-master-gpio.c > > f4bd3b6a Chris Bostic 2017-03-29 498 { > f4bd3b6a Chris Bostic 2017-03-29 499 struct fsi_master_gpio *master = to_fsi_master_gpio(_master); > f4bd3b6a Chris Bostic 2017-03-29 500 > f4bd3b6a Chris Bostic 2017-03-29 501 if (link != 0) > f4bd3b6a Chris Bostic 2017-03-29 502 return -ENODEV; > f4bd3b6a Chris Bostic 2017-03-29 503 if (master->gpio_enable) > f4bd3b6a Chris Bostic 2017-03-29 504 gpiod_set_value(master->gpio_enable, 1); > f4bd3b6a Chris Bostic 2017-03-29 505 > f4bd3b6a Chris Bostic 2017-03-29 506 return 0; > f4bd3b6a Chris Bostic 2017-03-29 507 } > f4bd3b6a Chris Bostic 2017-03-29 508 > f4bd3b6a Chris Bostic 2017-03-29 509 static void fsi_master_gpio_release(struct device *dev) > f4bd3b6a Chris Bostic 2017-03-29 510 { > f4bd3b6a Chris Bostic 2017-03-29 511 struct fsi_master_gpio *master = to_fsi_master_gpio( > f4bd3b6a Chris Bostic 2017-03-29 512 dev_to_fsi_master(dev)); > f4bd3b6a Chris Bostic 2017-03-29 513 > f4bd3b6a Chris Bostic 2017-03-29 @514 kfree(master); > f4bd3b6a Chris Bostic 2017-03-29 515 } > f4bd3b6a Chris Bostic 2017-03-29 516 > f4bd3b6a Chris Bostic 2017-03-29 517 static int fsi_master_gpio_probe(struct platform_device *pdev) > f4bd3b6a Chris Bostic 2017-03-29 518 { > f4bd3b6a Chris Bostic 2017-03-29 519 struct fsi_master_gpio *master; > f4bd3b6a Chris Bostic 2017-03-29 520 struct gpio_desc *gpio; > f4bd3b6a Chris Bostic 2017-03-29 521 > f4bd3b6a Chris Bostic 2017-03-29 522 master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL); > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation >