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 X-Spam-Level: X-Spam-Status: No, score=-22.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D560DC433E0 for ; Tue, 23 Mar 2021 20:01:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A18AB619C8 for ; Tue, 23 Mar 2021 20:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233328AbhCWUBQ (ORCPT ); Tue, 23 Mar 2021 16:01:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:48998 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233109AbhCWUAs (ORCPT ); Tue, 23 Mar 2021 16:00:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616529647; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bNZnjO42gjVhs5dIrJp7IOz6pVwoWDKxlsrX2l5lccI=; b=GkP4e5zYn0sx1lEtQLtJ+pUjdVfc6qYijPmjs6Cs9PkP03xBOutam4eJdjaWf7Zby5z9VI 34b5r44hJulKUNbJ5ZPcO7GnaLcYjw3tRZazzyEBPL9HF6fljKpaabHPvuYAhhOwPTZ9R1 zGzems3okq3w/qOov9EiSvC6VkCZSDg= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-118-R1piomdUMUyqAdnDYRScSw-1; Tue, 23 Mar 2021 16:00:45 -0400 X-MC-Unique: R1piomdUMUyqAdnDYRScSw-1 Received: by mail-ej1-f72.google.com with SMTP id en21so1557755ejc.2 for ; Tue, 23 Mar 2021 13:00:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bNZnjO42gjVhs5dIrJp7IOz6pVwoWDKxlsrX2l5lccI=; b=c+2/2ja5N280vjgCvpXctYrCvJrJu8KSQ05cvS3hq3Xrz4xDGS1AVFMkaNzKH6bLE/ pQ1YmXWzlNQHtr6NY3n1TGJuj9mdrYxZ3Di+fvi8kCasfqetaT0+3V37zg6PV/phq+WX WSli6kjF2r9SESB9vjHnHYHyPIznEonyp/Pb9DrxrDhCCzeuRorBHIhttCIMfl4cby5B KWmYeZ+GRcOzWqH8tg9K/FGv5YeDKZ0cOB3gqcwbnA7q8fMNe8befK4PTVKzZvC+2xGd K8wLFyemgFzcx3jp4rxmac29zPVftjUuDp9xbXESGMcPpdwCi/gX7SUmGm8V6a/d2jTN jM8w== X-Gm-Message-State: AOAM530VtuSDJGh/ty3obWHr9LAEUuzE61Ipi4lwCSXWVIbZYyF1T6J6 PpUbIJUICFD84AA7LQD99wGSvPHjh9zS3vSOIb/ZuqXMyAHey5nIMEmvvh4bZg7Vrf5MrHnaB3A A0nYO2Gwr2hmZgdFAdZp9mEwu X-Received: by 2002:a05:6402:4407:: with SMTP id y7mr6211375eda.247.1616529644232; Tue, 23 Mar 2021 13:00:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh2ay7mE48Qtx5mN3z/Kd46hbrymSoqNAOGINWQybomqJrcMyzc0xZMTC0DqTMcMpgPmXOOA== X-Received: by 2002:a05:6402:4407:: with SMTP id y7mr6211358eda.247.1616529644103; Tue, 23 Mar 2021 13:00:44 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id f21sm11620875ejw.124.2021.03.23.13.00.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Mar 2021 13:00:43 -0700 (PDT) Subject: Re: [PATCH] asus-laptop: fix kobj_to_dev.cocci warnings To: Julia Lawall , Corentin Chary , Darren Hart , Andy Shevchenko , acpi4asus-user@lists.sourceforge.net Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@lists.01.org, Denis Efremov References: From: Hans de Goede Message-ID: <6e2b729c-11c7-cdf9-18cc-8d3aa988e134@redhat.com> Date: Tue, 23 Mar 2021 21:00:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 3/17/21 1:00 PM, Julia Lawall wrote: > From: kernel test robot > > Use kobj_to_dev() instead of container_of() > > Generated by: scripts/coccinelle/api/kobj_to_dev.cocci > > CC: Denis Efremov > Reported-by: kernel test robot > Signed-off-by: kernel test robot > Signed-off-by: Julia Lawall Thank you for your patch, I've applied this patch to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window. Regards, Hans > --- > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 1df27313f50a57497c1faeb6a6ae4ca939c85a7d > commit: a2fc3718bc22e85378085568ecc5765fb28cabce coccinelle: api: add kobj_to_dev.cocci script > :::::: branch date: 5 hours ago > :::::: commit date: 7 months ago > > asus-laptop.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/platform/x86/asus-laptop.c > +++ b/drivers/platform/x86/asus-laptop.c > @@ -1569,7 +1569,7 @@ static umode_t asus_sysfs_is_visible(str > struct attribute *attr, > int idx) > { > - struct device *dev = container_of(kobj, struct device, kobj); > + struct device *dev = kobj_to_dev(kobj); > struct asus_laptop *asus = dev_get_drvdata(dev); > acpi_handle handle = asus->handle; > bool supported; >