Message ID | 20240112072128.141954-1-chentao@kylinos.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-24372-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp13304dyc; Thu, 11 Jan 2024 23:23:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGX0OA14JHM+YZ++0RBblqM8MRe1GZ85Bez7eGFNsqcq0LxmNxXhSLtDCbOpTsUyJ7G1YZy X-Received: by 2002:a17:907:31c2:b0:a29:8b1e:15cf with SMTP id xf2-20020a17090731c200b00a298b1e15cfmr523562ejb.26.1705044211149; Thu, 11 Jan 2024 23:23:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705044211; cv=none; d=google.com; s=arc-20160816; b=lnPQGOdDa0ap3ZjyHJaBiKvcg/crq9hncYCWhtteStOHDnexx+qLor2Cb7F+QjvIB5 XfCLluV8yrAUAOBadDVOxsLZz/MM5M3F75PIYESYZRpQ0BkMFtXz4ZEO/7ZY1kFdki/c oMPVAPqBB0rDIuoG5tyU9ihJPDt/GF++JSOzEJwBB53hZ0XxzEU7bAAxOAnISu+rS0il eWYXK2CRz4es9Dpy1DQcX4VDToH6LHZKTjLkk2Xcb1rwMGeEpsh9Zy0/q7aZFyNzTCE4 THED6yE2a3D+4nRCqAMX76RZWlWyZ7fV0D7iVmuWzxWMcPhwRId+LiqP6Z9ZecrZ8t8L SC7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=UbyJWURCf1Uhh+L2WzF7CwYubzxzA1WEcmn9Ac+RMMM=; fh=3xRN473/2fmV/UEl5Tmmr8anJpRmDs335eEaZhY8FP0=; b=EVQarwhmLUiLen/eLi3nJvfJxDVnEIM/2ai95tsRs+4Q3uZcSzrn1uIoZ2AqDDK45T v4FIx1wgx5ndVoZY/CVSL/tDFgot4fTFPd79hA6XPpN+ynGmdI59LxyK/+E0kgSPjhsQ TQ1GJj9KrMbEDcwvdC9oDxSW6xL9NJvGoWQGymsKonzMLWh3MWBzSmVljQbNjBOtg1rI oEMdGBACatgUqujaQc5o3dSa5pjBDp4lNtHF+ZCqkNWzcOUlkz/cfxSfcSvFSVOhelwd KvRubMdzxdcaeI01qhw2tIfu2zRpdNO/PjLcbVJ0xr9/nJtlysksOiOdk4gc9RkH/Pmj 2kNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24372-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24372-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ci26-20020a170906c35a00b00a28a7f4e172si1094738ejb.985.2024.01.11.23.23.30 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 23:23:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24372-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24372-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24372-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C04981F267E0 for <ouuuleilei@gmail.com>; Fri, 12 Jan 2024 07:23:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03DF85EE66; Fri, 12 Jan 2024 07:22:04 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 054195D919; Fri, 12 Jan 2024 07:21:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 477e03e742094c3a81d7a56c68d3f3f1-20240112 X-CID-O-RULE: Release_Ham X-CID-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:bfa888c2-196b-4123-afef-3393926d8296,IP:20, URL:0,TC:0,Content:0,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACT ION:release,TS:30 X-CID-INFO: VERSION:1.1.35,REQID:bfa888c2-196b-4123-afef-3393926d8296,IP:20,UR L:0,TC:0,Content:0,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:30 X-CID-META: VersionHash:5d391d7,CLOUDID:f1f92c8e-e2c0-40b0-a8fe-7c7e47299109,B ulkID:2401121521451LMTVSBG,BulkQuantity:0,Recheck:0,SF:66|38|24|17|19|44|1 02,TC:nil,Content:0,EDM:5,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL :0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI X-UUID: 477e03e742094c3a81d7a56c68d3f3f1-20240112 X-User: chentao@kylinos.cn Received: from kernel.. [(116.128.244.171)] by mailgw (envelope-from <chentao@kylinos.cn>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1529031778; Fri, 12 Jan 2024 15:21:43 +0800 From: Kunwu Chan <chentao@kylinos.cn> To: diana.craciun@oss.nxp.com, alex.williamson@redhat.com Cc: eric.auger@redhat.com, Bharat.Bhushan@nxp.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan <chentao@kylinos.cn> Subject: [PATCH] vfio/fsl-mc: Remove unnecessary free in vfio_set_trigger Date: Fri, 12 Jan 2024 15:21:28 +0800 Message-Id: <20240112072128.141954-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787868438288454705 X-GMAIL-MSGID: 1787868438288454705 |
Series |
vfio/fsl-mc: Remove unnecessary free in vfio_set_trigger
|
|
Commit Message
Kunwu Chan
Jan. 12, 2024, 7:21 a.m. UTC
'irq->name' is initialed by kasprintf, so there is no need
to free it before initializing.
Fixes: cc0ee20bd969 ("vfio/fsl-mc: trigger an interrupt via eventfd")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c | 1 -
1 file changed, 1 deletion(-)
Comments
On Fri, 12 Jan 2024 15:21:28 +0800 Kunwu Chan <chentao@kylinos.cn> wrote: > 'irq->name' is initialed by kasprintf, so there is no need > to free it before initializing. This is just as bogus as the vfio-platform version. Thanks, Alex > Fixes: cc0ee20bd969 ("vfio/fsl-mc: trigger an interrupt via eventfd") > Signed-off-by: Kunwu Chan <chentao@kylinos.cn> > --- > drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c > index d62fbfff20b8..31f0716e7ab3 100644 > --- a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c > +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c > @@ -69,7 +69,6 @@ static int vfio_set_trigger(struct vfio_fsl_mc_device *vdev, > hwirq = vdev->mc_dev->irqs[index]->virq; > if (irq->trigger) { > free_irq(hwirq, irq); > - kfree(irq->name); > eventfd_ctx_put(irq->trigger); > irq->trigger = NULL; > }
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c index d62fbfff20b8..31f0716e7ab3 100644 --- a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c @@ -69,7 +69,6 @@ static int vfio_set_trigger(struct vfio_fsl_mc_device *vdev, hwirq = vdev->mc_dev->irqs[index]->virq; if (irq->trigger) { free_irq(hwirq, irq); - kfree(irq->name); eventfd_ctx_put(irq->trigger); irq->trigger = NULL; }