Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4418716ioa; Wed, 27 Apr 2022 03:31:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxERUyVXXWGrMyl4feSwqqsEwDG0Y4zzFg2m0nT5Ffjzy8rTfj7B9vwxSJ4bygcJKa+mBbR X-Received: by 2002:a65:6a45:0:b0:3aa:69df:3b62 with SMTP id o5-20020a656a45000000b003aa69df3b62mr23565086pgu.394.1651055500944; Wed, 27 Apr 2022 03:31:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651055500; cv=none; d=google.com; s=arc-20160816; b=drY90ouRT6mp75yIiG+zIwbO3NrFx+NHkUtK0uGLQc9YIin8MdydXXuOj8CIeriNff 15539WEZi2LQBQr7mYnTl+D7k9WskRiEtjghGxfFb12Eb4gPb5Afi7CInQeJPjCtT+Dn T6sJKpQA/LTfiAebFrCgQ2vL3qYpCELKcA9NTmFeMzSRi2EvZol6IoFN9s48Ja2oa3P/ zfy+H+cN7zmdHHgTpElcFbcThw/tw/gSPGd8pelOZ4Ymyr1yjmhENgeoySi//Ky9ben4 Y44tebcP9Ym/H6pzYvUidNtyBWM9raaM1VByhv3lACZ2AwoAyq06wcCjBW4B1sUDy0CG kMJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9/wPbaS/ygwe2xLBOnnhPg4uqAnSA4Ct48vVffLTDVk=; b=g+6X+d9OXtYxdnZJerd4kFISdeF+fY3O+53coh9mD6z54Jkgk0J5ZapA2zazdNSnA4 XvQS3u+GvFYjGHko2Hc4TbNrhHTQUUxML/hW9b+EicRi8ZMHmif/975DmUjqlUKGTRLj WXUCbBDzF++ZoO2KN+X/4nWTatw6bdA5h6qDf3Z49lcCmQk6BD4dGVMBTUXbg+E6EkkV hiYZiGURxSE96ivDm3ZeIf6APr22xIO4e6//JoB1eRO4bozDqsNl/qt/5k9QUe4cMztq LCWO/tCK1M370fprslg8+H/+iATRA89eFIbHn+P2LonECg5Za7LSsgqVLYbvNMjuP6Tk zK8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hZPxikBF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b67-20020a633446000000b0039d3228a8c7si1140079pga.84.2022.04.27.03.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:31:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hZPxikBF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7C0A63AD6F8; Wed, 27 Apr 2022 02:46:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351708AbiDZQ70 (ORCPT + 99 others); Tue, 26 Apr 2022 12:59:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348677AbiDZQ7Z (ORCPT ); Tue, 26 Apr 2022 12:59:25 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FE41165BF for ; Tue, 26 Apr 2022 09:56:17 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id j8-20020a17090a060800b001cd4fb60dccso3063419pjj.2 for ; Tue, 26 Apr 2022 09:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9/wPbaS/ygwe2xLBOnnhPg4uqAnSA4Ct48vVffLTDVk=; b=hZPxikBFzuALeYibUcgzooE8Ee5esUOwPQJ6q0UuvlqDLESH8Z2e5tYT7/MyW3I5WX FRVk5Xm+BS3Qw7A7pfpPUzEYfffDbpRSVZnu07KOVIQBbDaVSp9OngGzLHpSkokmmklp kHRKtJVKraTQQ6moUg7xXW4ACY74gjxeqQN0Oyt3OWwGV45aISYmcVIkazDA/u0xG2hC IqZnCGqdylLWMkBESaGoaRgF2bGiZuQcgE5vxUIlczQQFXW66SPlWB8bylT3qaeAAahY ys7mm5qYG8TP1OkGlW6slaZpRBSRsS8p1HbrZVqL459ksU1VxgL6ZvPOMaEKJ8zULgFm /iuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9/wPbaS/ygwe2xLBOnnhPg4uqAnSA4Ct48vVffLTDVk=; b=CcDqq196++qlnSW8kfTEsENmvztLJGhi4O5rfTkOSO+fMZP/sIWzB1fRhRs/jsk7x5 gx2fS3qv8IfPxeXspyXrOxa5KUER+ipO7YqmdyJJEogCiwZJb9oTzcXOeNAQvCkylGpY 4PNs5e8VQh49qjISjAAkZ8BA3Zme9pViL2YUgMZ9cZ189UsrvHHEV0XHKxjdfwPlgnAP ZkCGwD+LDIhoINTf6QfT+hdISFYnr2P9ZUfnFh02CmTbJG0h0TDK6NiplUD5m5A8xuGe q+VtZw3J0oK3diCrSB3MsRkVmvLKMsdp7LYELNM2X1cfPXEmdCfd0VQ9HlZ7IIRl0Jvb CCPA== X-Gm-Message-State: AOAM532n/NYfcRiAKhUlkfRPT0Fxybv8FwTyXgCMG6bzA44LTy9y7hXE AvUxK87ahyp2FF5xgMCiE6/n6Q== X-Received: by 2002:a17:90a:9109:b0:1cb:a814:8947 with SMTP id k9-20020a17090a910900b001cba8148947mr38074528pjo.52.1650992176468; Tue, 26 Apr 2022 09:56:16 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id d18-20020a056a0010d200b004fa2e13ce80sm17074509pfu.76.2022.04.26.09.56.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:56:15 -0700 (PDT) Date: Tue, 26 Apr 2022 10:56:13 -0600 From: Mathieu Poirier To: Hangyu Hua Cc: bjorn.andersson@linaro.org, arnaud.pouliquen@foss.st.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/3] rpmsg: virtio: Fix the unregistration of the device rpmsg_ctrl Message-ID: <20220426165613.GA2007637@p14s> References: <20220426060536.15594-1-hbh25y@gmail.com> <20220426060536.15594-4-hbh25y@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220426060536.15594-4-hbh25y@gmail.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 26, 2022 at 02:05:36PM +0800, Hangyu Hua wrote: > Unregister the rpmsg_ctrl device instead of just freeing the > the virtio_rpmsg_channel structure. > This will properly unregister the device and call > virtio_rpmsg_release_device() that frees the structure. > > Fixes: c486682ae1e2 ("rpmsg: virtio: Register the rpmsg_char device") > Signed-off-by: Arnaud Pouliquen > Cc: Hangyu Hua > Reviewed-by: Hangyu Hua > --- > drivers/rpmsg/virtio_rpmsg_bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c > index 291fc1cfab7f..485e95f506df 100644 > --- a/drivers/rpmsg/virtio_rpmsg_bus.c > +++ b/drivers/rpmsg/virtio_rpmsg_bus.c > @@ -862,7 +862,7 @@ static void rpmsg_virtio_del_ctrl_dev(struct rpmsg_device *rpdev_ctrl) > { > if (!rpdev_ctrl) > return; > - kfree(to_virtio_rpmsg_channel(rpdev_ctrl)); > + device_unregister(&rpdev_ctrl->dev); The author of this patch should have been Arnaud, something I have fixed before applying this set. Thanks, Mathieu > } > > static int rpmsg_probe(struct virtio_device *vdev) > -- > 2.25.1 >