From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64E14C433EF for ; Thu, 5 May 2022 18:12:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9RHqvvZFnx8BXvXzAfpNpRFnZ1WTu7mpov9Vz0/T0pM=; b=J/70pPbRdaSKr1 ppEdY4ZUjpkLiPIz5yxHrpmfAA7AWatUglRwt3+WJon6GvwiUcwxvEzs3tXzRlxluBhpd1oFvBSXt 0HiiiobCg/M3Xsi5zmoWVxn5JrF63s/bJ8L2ydn9abqr3ME5QeBOfVp4x4RInQ5Ivx6JXpkSVsitP IZ0IxWOLI7AZw4Tm7kACs7npCnkz3co5kCOAXdVlzLqBRydVYYlcLuxZPzcnUQJJUekrO44qL7hIU s+xB5/RIQQ36242oI9jL4lsewIkR15TuadC4+CZCQKeHMPTZ4gtdEt5hX39oE/ruLt/x8RoDym+ft lNWEWmRVO/Fo9eeXPcLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmfwg-00HFif-U3; Thu, 05 May 2022 18:11:23 +0000 Received: from us-smtp-delivery-74.mimecast.com ([170.10.133.74]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmfwd-00HFhm-Ua for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2022 18:11:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651774279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kLRudaiszTccdqB1Vd77KpaI2iWJChA3O1GYOzzQuoc=; b=KQyI2DVG398nR3VPPvJC3CxRdB8Dj8fwSE4b5CWvehaCz8E17BHBqhpidQ0fjX+ZCGF3pC wAiuVLcTrKgy7pVRTF1p3wkof+WEknG9P/Ci+Q7VUBXyQIy6teVgCoslM+8ZXp+Xn98IRO wwEDklPoO9kMYLrYsTE+YC3DcelU/3o= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-538-8m3pKSbPMcKjnW6kLmErmg-1; Thu, 05 May 2022 14:11:13 -0400 X-MC-Unique: 8m3pKSbPMcKjnW6kLmErmg-1 Received: by mail-qv1-f71.google.com with SMTP id bu6-20020ad455e6000000b004563a74e3f9so3840997qvb.9 for ; Thu, 05 May 2022 11:11:13 -0700 (PDT) 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=kLRudaiszTccdqB1Vd77KpaI2iWJChA3O1GYOzzQuoc=; b=AHrKIQ6KImXjgowoDN1BS54XQHirAq9t6ut0UDUvpT+B3SHxIon43c3Ou1IX96CiUV 2fmPqXtXqlmCos+AohBJMVtD5zaVNi53ez3z0jbFkRJOypEboJr8Iuz0wGtt2suAwjRv 6qy+vZLsfG/2K9h3wm5lHQ4Y676cgFIJdrYqhkP2FIyh+ZlVkl6apCj6pSYjAJ0cF/l8 v0SU75a2JWGpyhWcmg8GNw4EKDnr7JcWbWDr0A9nHNB5dbbPZdiux5vBgGiPz5eL8My6 kv0fbOhNqttTdzr/XQJAKGldGtNskg5XaQEiNOrTJZYaCBQ6NG1iyvSAaZ2SWrAdVVEJ OEZA== X-Gm-Message-State: AOAM533B3GACZAjQ6srbzBjHB3ccAXCqJA39NKDJLcbj32Ld02omBz/h 7sjLgUhbrBxWNNFWei6HzfqbBKVEoW3kBxL9qLvcZuNv0ABSfPaUAMpgkLgTjYw6S7OAff8iCub dpZifIuRxcaGxycDcc+3aLM5L14g5cfuEGDQ= X-Received: by 2002:a05:622a:20f:b0:2f3:4e5c:3271 with SMTP id b15-20020a05622a020f00b002f34e5c3271mr25103852qtx.44.1651774272663; Thu, 05 May 2022 11:11:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwODdZVXSmIrr3XKHkaq4AMOb8tfd+YHR41zI+HxWst1xMd12GMM8tAoRhnMZaQTl0FAyFWCg== X-Received: by 2002:a05:622a:20f:b0:2f3:4e5c:3271 with SMTP id b15-20020a05622a020f00b002f34e5c3271mr25103826qtx.44.1651774272473; Thu, 05 May 2022 11:11:12 -0700 (PDT) Received: from fedora (modemcable200.11-22-96.mc.videotron.ca. [96.22.11.200]) by smtp.gmail.com with ESMTPSA id d9-20020ac85349000000b002f39b99f68bsm1167214qto.37.2022.05.05.11.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 11:11:12 -0700 (PDT) Date: Thu, 5 May 2022 14:11:10 -0400 From: Adrien Thierry To: Stefan Wahren Cc: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] staging: vchiq_arm: get rid of global device structure Message-ID: References: <20220502183045.206519-1-athierry@redhat.com> <20220502183045.206519-3-athierry@redhat.com> <8483a250-da97-1875-4ea3-598f46ae96ce@i2se.com> MIME-Version: 1.0 In-Reply-To: <8483a250-da97-1875-4ea3-598f46ae96ce@i2se.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=athierry@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_111120_092731_2BFFA6C5 X-CRM114-Status: GOOD ( 14.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Stefan, Thanks for your feedback. > i understand the motivation, but could you please explain more in detail > why you decided to add vchiq_instance instead of device reference? I > think vchiq_instance is a more internal structure which should be > avoided in kernel consumers like bcm2835-audio or mmal. I used the vchiq_instance instead of the device reference because in order to get rid of the vchiq_states array (patch 3/3 [1]), I needed another way to access the vchiq_state in the 'handle_to_service' function. So I passed the vchiq_instance to it (I could also have passed the state directly instead of the instance), and this propagated in the caller chain all the way up to 'vchiq_bulk_transmit' and friends which are used in the bcm2835-audio consumer. Please let me know if you see a better way of doing this :) Thanks, Adrien [1] https://lore.kernel.org/all/20220502183045.206519-4-athierry@redhat.com/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel