Message ID | 20220821215027.461344-1-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1oPsqA-00AXBg-0B; Sun, 21 Aug 2022 21:50:42 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231557AbiHUVuh (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Sun, 21 Aug 2022 17:50:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230281AbiHUVug (ORCPT <rfc822;linux-media@vger.kernel.org>); Sun, 21 Aug 2022 17:50:36 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88B2E17E27 for <linux-media@vger.kernel.org>; Sun, 21 Aug 2022 14:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661118633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=EVWt5YPv1Y6lfXEBnEhRkbFkVD05nIjy2jLaiBmAqYM=; b=f3CJiMfJ3nEZpv6GAy0rXLpym6qFKe1t9nQC9vOp1ADRbTRhmBhPtSESe3Mm5dePcIQPSw gXcQn1e1L5PMXognesMosZD1z//HBgDbI4zQxTqmTN7AcuY29MRj9ueXXw80qLQANxHS15 ivHMDh3TqEwSq5IgjY9pkN7vBpru0Wk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-606-s0xaAefdPGm0dI0L4TXwfQ-1; Sun, 21 Aug 2022 17:50:30 -0400 X-MC-Unique: s0xaAefdPGm0dI0L4TXwfQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 99F25811E76; Sun, 21 Aug 2022 21:50:29 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.192.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC330404C6F2; Sun, 21 Aug 2022 21:50:27 +0000 (UTC) From: Hans de Goede <hdegoede@redhat.com> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com>, Tsuchiya Yuto <kitakar@gmail.com>, Andy Shevchenko <andy@kernel.org>, Yury Luneff <yury.lunev@gmail.com>, Nable <nable.maininbox@googlemail.com>, andrey.i.trufanov@gmail.com, Fabio Aiuto <fabioaiuto83@gmail.com>, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Subject: [PATCH 01/13] media: atomisp_gmin_platform: Switch to use acpi_evaluate_dsm_typed() Date: Sun, 21 Aug 2022 23:50:15 +0200 Message-Id: <20220821215027.461344-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
[01/13] media: atomisp_gmin_platform: Switch to use acpi_evaluate_dsm_typed()
|
|
Commit Message
Hans de Goede
Aug. 21, 2022, 9:50 p.m. UTC
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> The acpi_evaluate_dsm_typed() provides a way to check the type of the object evaluated by _DSM call. Use it instead of open coded variant. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220730155905.90091-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
Comments
On Mon, Aug 22, 2022 at 12:50 AM Hans de Goede <hdegoede@redhat.com> wrote: > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > The acpi_evaluate_dsm_typed() provides a way to check the type of the > object evaluated by _DSM call. Use it instead of open coded variant. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Link: https://lore.kernel.org/r/20220730155905.90091-1-andriy.shevchenko@linux.intel.com > Reviewed-by: Hans de Goede <hdegoede@redhat.com> > Tested-by: Hans de Goede <hdegoede@redhat.com> > Signed-off-by: Hans de Goede <hdegoede@redhat.com> Thanks! I believe the v2 of this patch (when it was sent standalone) has been Acked by Sakari. But I might be wrong.
Hi, On 8/22/22 00:31, Andy Shevchenko wrote: > On Mon, Aug 22, 2022 at 12:50 AM Hans de Goede <hdegoede@redhat.com> wrote: >> >> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> >> >> The acpi_evaluate_dsm_typed() provides a way to check the type of the >> object evaluated by _DSM call. Use it instead of open coded variant. >> >> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> >> Link: https://lore.kernel.org/r/20220730155905.90091-1-andriy.shevchenko@linux.intel.com >> Reviewed-by: Hans de Goede <hdegoede@redhat.com> >> Tested-by: Hans de Goede <hdegoede@redhat.com> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com> > > Thanks! > I believe the v2 of this patch (when it was sent standalone) has been > Acked by Sakari. But I might be wrong. You are right: https://lore.kernel.org/linux-media/Yud2hzq3JQBzf+oK@paasikivi.fi.intel.com/ So let me add that here, then patchwork should pick it up: Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Regards, Hans
On Mon, Aug 22, 2022 at 11:02 AM Hans de Goede <hdegoede@redhat.com> wrote: > On 8/22/22 00:31, Andy Shevchenko wrote: ... > So let me add that here, then patchwork should pick it up: > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> You may also add Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> to all patches, but the 1st (it has already SoB) and commented ones, which I'm going to do soon.
On Mon, Aug 22, 2022 at 3:57 PM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > On Mon, Aug 22, 2022 at 11:02 AM Hans de Goede <hdegoede@redhat.com> wrote: ... > You may also add > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > to all patches, but the 1st (it has already SoB) > and commented ones, > which I'm going to do soon. (should be read as) ... and non-commented, that become visible after I comment on a couple, which I'm going to do soon.
diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c index 133d7d56fff2..648469de2cdc 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c @@ -1250,16 +1250,14 @@ static int gmin_get_config_dsm_var(struct device *dev, if (!strcmp(var, "CamClk")) return -EINVAL; - obj = acpi_evaluate_dsm(handle, &atomisp_dsm_guid, 0, 0, NULL); + /* Return on unexpected object type */ + obj = acpi_evaluate_dsm_typed(handle, &atomisp_dsm_guid, 0, 0, NULL, + ACPI_TYPE_PACKAGE); if (!obj) { dev_info_once(dev, "Didn't find ACPI _DSM table.\n"); return -EINVAL; } - /* Return on unexpected object type */ - if (obj->type != ACPI_TYPE_PACKAGE) - return -EINVAL; - #if 0 /* Just for debugging purposes */ for (i = 0; i < obj->package.count; i++) { union acpi_object *cur = &obj->package.elements[i];