Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4643510ioa; Wed, 27 Apr 2022 08:07:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzH7WpbpePElOU7MuOAOyz1847HYdYinNWsQ8sgKWgflxXA2Ecvx8fDAAoB5j+33Quby35T X-Received: by 2002:a17:903:1c4:b0:15d:1dd5:6775 with SMTP id e4-20020a17090301c400b0015d1dd56775mr14574136plh.106.1651072022260; Wed, 27 Apr 2022 08:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651072022; cv=none; d=google.com; s=arc-20160816; b=jZM1egkcl05qvcFDLxH6ZRmvl+Uovq0gYJaCnJCzoVkl75naQsT2GQyi0gNpVHTTsa c00wfd4SxRkLzzYD8CIBNfX7lu3OWD1ScrsgtIqJH8XXq1PK6TYE2DrQ9Lrf4ddPDP3/ o4XUpA8a4Ps2/FfjfYA0bN6kfh458pauL0fiAPbEOLca6NBVFJJHLY4h+CK4IfJo3Ip5 ClKhC20sBpb6WmHA83cE72sTqiGUKeuDb15BCW9z5+JB4qw4vihaps1tKd1fwAXxIgaf nPxFlF7TIOjVI/m7hlWMvaxuLTjKd6DTtHBonQiFiPk/k4sB3EynYVlEBBva000WpM82 kBbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Bp4nvCVNUoCNEAKvKfnnGKwiKlXJzQznkSn+Xrwkfm0=; b=YmJGqh4nZGgFkDMnYCx7lRzr9wLdWJLohddTS15f9GZmWp7oSk/uP5+EKH5gjH95I3 d6LTBABYc50Ngt8ukRqaT1K5bCC9jMo660w37ATMJrBAuGkfXsRO2dvPKa1XGCgJgBgH u5O3jtgc65yLiDpj6TTmTplSkI8Wh3/obVVAeGC3STYd1X5y/09x3x17f3rMZFLSmdTg uwjwCwG6OQ1CCFrdGdzG3WaqHTHS42QcYFW6bR+w7wlcP84ILTNTqWulUnbqqws13if0 B9+Ja+mpFyrbB7Jgom4LmjBALx5cIDnJW70Q8EjEIxIr2JhQupVseiqZqTIbZnYHzGIN LUEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MhMHiFv6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x12-20020a170902b40c00b0015b55ac4017si1774303plr.265.2022.04.27.08.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 08:07:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MhMHiFv6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 64CED326E1; Wed, 27 Apr 2022 07:39:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238334AbiD0OlY (ORCPT + 99 others); Wed, 27 Apr 2022 10:41:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238430AbiD0OlU (ORCPT ); Wed, 27 Apr 2022 10:41:20 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 910C733E1B for ; Wed, 27 Apr 2022 07:37:58 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id i27so3808105ejd.9 for ; Wed, 27 Apr 2022 07:37:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Bp4nvCVNUoCNEAKvKfnnGKwiKlXJzQznkSn+Xrwkfm0=; b=MhMHiFv6IziSDkdNlh2UkxZ6wRadtQURhNooR20okqyWTqd2+czoeWuBhz0z4JWzm8 D14A391nTFsO7zVvvx68QGBFV/NOikeIxpN3XqZJczoNMYIaJUUeSeasMMd31dP0x4yz HAHkEH/ctSv3WhVSG4cQx1OEqpCyiyr1jKS9XAn8ktOm8kgEyzvseAsBYBpB9+LMuoZl Oc7jIsPs+Ji4y7A79TbeEByv2p4W2COBmGrtXw7KkVbhO3Q5qvacwutoKX53YUG81m/B cLitJrR/sKOPueb/Er8XqOnIr3YzTOYxjeLUWGAzANVG7pwKUvFsaq7ewf82X0ralNxK uZzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Bp4nvCVNUoCNEAKvKfnnGKwiKlXJzQznkSn+Xrwkfm0=; b=QIL+To8jrwN1bbxB+gnQ0gOuHl5hJxC/ohnS1nPT+nSyCeJDUgw0rqbKVwNZu6rlha gYRWxeEne5UbmtceTj5Ak4hMpBJsjk8zulemC2tF/1YFhySQU+cpbKWU/L/Ac/8x2Fn3 VQZtlLNBwgnyYylpQZD8P6Z3T3MnoXLbJErtHZKquesPyDeeUphEjdub4zfR8+WLQTN4 TcE98m6Leh9yBe+ojLcW1dOY2xs+dayVlfUOgAbfpZD9odH6URIF9Ox5VKX8V16Rea3z zwzB3pe/yIbRrH0DuwGP0qtIR//fiAs9blDSj2x+gLEVUJFmufD2/mbGfsYZ2ssdMl+f rt9w== X-Gm-Message-State: AOAM532CYJUgIrweXfFmsKV67JUmfEN5malFCdWY/Tw2tcjlvSTlQ46C FepwU0pyeqHaN2L6HNBKlJU4HEAPZeTnAMHWEiEjug== X-Received: by 2002:a17:907:9506:b0:6da:b4cd:515b with SMTP id ew6-20020a170907950600b006dab4cd515bmr26917366ejc.602.1651070274544; Wed, 27 Apr 2022 07:37:54 -0700 (PDT) MIME-Version: 1.0 References: <20220426060536.15594-1-hbh25y@gmail.com> <20220426060536.15594-4-hbh25y@gmail.com> <20220426165613.GA2007637@p14s> <55c946ad-5d19-1d38-3484-1ab059a27642@gmail.com> In-Reply-To: <55c946ad-5d19-1d38-3484-1ab059a27642@gmail.com> From: Mathieu Poirier Date: Wed, 27 Apr 2022 08:37:42 -0600 Message-ID: Subject: Re: [PATCH v2 3/3] rpmsg: virtio: Fix the unregistration of the device rpmsg_ctrl To: Hangyu Hua Cc: bjorn.andersson@linaro.org, arnaud.pouliquen@foss.st.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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, 26 Apr 2022 at 20:50, Hangyu Hua wrote: > > On 2022/4/27 00:56, Mathieu Poirier wrote: > > 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 > > > > I get it. I'm sorry i thought Signed-off-by and a description in cover > letter are enough to express. Do i need to do anything else? I don't. > > Thanks, > Hangyu > >> } > >> > >> static int rpmsg_probe(struct virtio_device *vdev) > >> -- > >> 2.25.1 > >>