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=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 EFAEEC433E1 for ; Tue, 14 Jul 2020 02:16:20 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF0BB20674 for ; Tue, 14 Jul 2020 02:16:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF0BB20674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vt.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1jvATp-000158-SI; Mon, 13 Jul 2020 22:15:37 -0400 Received: from omr2.cc.ipv6.vt.edu ([2607:b400:92:8400:0:33:fb76:806e] helo=omr2.cc.vt.edu) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1jvATl-000153-HP for kernelnewbies@kernelnewbies.org; Mon, 13 Jul 2020 22:15:33 -0400 Received: from mr1.cc.vt.edu (mr1.cc.ipv6.vt.edu [IPv6:2607:b400:92:8300:0:31:1732:8aa4]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id 06E2FWm7027347 for ; Mon, 13 Jul 2020 22:15:32 -0400 Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mr1.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 06E2FQpq032500 for ; Mon, 13 Jul 2020 22:15:31 -0400 Received: by mail-qt1-f198.google.com with SMTP id m25so11579290qtk.1 for ; Mon, 13 Jul 2020 19:15:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=kvknEglvZ92z8QIdvrHLCILgZt6AV2KXn02G9hI2i5g=; b=QE552SCMaE4WqouV0vRMJXrO7dlG5bgW0zos/7adFH9d6zIhAda1JuemlRgVCFsqbM 6VbClwSq10WyslWYe9hilRMGx9/sIrMsIcn6/uPJQom0o1EwK425UpI+X3yZmnDutboL d0t9EpbB/a0Z/P43aVy1HOiXNwbtvYIRPr2vYSNOMO7pg3LO2vK4l76npZH8YJ0ntdQA 33i7x3l7XhFuFjeqwPMIGRHu+NTPkX+mgE2WuG/4qnATGf0P871ShalMpnrR3wsZuCkQ dN82RT2WGd/gyVKl1VfSZNXYAaIp3WGaKtB/OcCs1xWWo14v+ZrduwKT/YNS0h2bdnyK agbA== X-Gm-Message-State: AOAM532QFtIiswA71vLlC5dUek14cIludkK5WPxyohZUxbt8zOK89QNm Ntd5tJwoVnhF4oQlpKP4+Oo0hRoQKXr+X3mb/siKVTmzQCyR/a+v2oUxmwr2Y5XkYJnHKwbFi/Q hYRLvRqjEQU/XlocFGy5FDig8u7aKWIekQle7Rcg= X-Received: by 2002:a0c:dc93:: with SMTP id n19mr2324234qvk.242.1594692926617; Mon, 13 Jul 2020 19:15:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg1mCeKCiH8ni02HPcW2sC6QCFeTZo8d4ixJzUCWJHNNCy2qPWf6cyoAyEA/1cmla0FpRpOQ== X-Received: by 2002:a0c:dc93:: with SMTP id n19mr2324215qvk.242.1594692926307; Mon, 13 Jul 2020 19:15:26 -0700 (PDT) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id x3sm21545732qkd.62.2020.07.13.19.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 19:15:24 -0700 (PDT) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: Greg KH Subject: Re: What's tha KOBJ_MAX action used for? In-Reply-To: <20200713123523.GB3092589@kroah.com> References: <20200713111725.kxjwte5hahmk23ik@CKC-BS-N0240> <20200713123523.GB3092589@kroah.com> Mime-Version: 1.0 Date: Mon, 13 Jul 2020 22:15:23 -0400 Message-ID: <431434.1594692923@turing-police> Cc: Garrit Franke , kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============8464614567457368457==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============8464614567457368457== Content-Type: multipart/signed; boundary="==_Exmh_1594692923_174210P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1594692923_174210P Content-Type: text/plain; charset=us-ascii On Mon, 13 Jul 2020 14:35:23 +0200, Greg KH said: > On Mon, Jul 13, 2020 at 01:17:25PM +0200, Garrit Franke wrote: > > Hi all, > > > > I was wondering, what the KOBJ_MAX action in the kobject.h file does. > > It is self explainatory what KOBJ_ADD, KOBJ_REMOVE etc. are used for, but KOBJ_MAX puzzles me. > > Can it maybe even be removed? > > Maybe it can, try it and see! I suspect that this line: for (action = 0; action < ARRAY_SIZE(kobject_actions); action++) { in lib/kobject_uenvent.c:kobject_action_type() combined with the fact that kobject_actions[] does *not* actually match the enum regardless of the comment above it, result in it being superfluous. Figuring out why is left as an exercise for the student. Oh, and if I had a dollar for every time I've been surprised by creative abuse of the cpp ## operator... :) --==_Exmh_1594692923_174210P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXw0VOgdmEQWDXROgAQK0gQ//e9dPY3QRFeoLQRyjtMeHXm5G+RHg1/68 ijiwgYHwAKML/qvJ/AFzfiQXS3qsZ1bQ4moFWx/6Rt6qpzZ9G1Lh5y9GJc0P11Zj 1FIkFwpEZ1OMxQYCyBu7L7M61Uscmxz2bZFeyIsqocJ43MWnLcy+14r7sO5SPQcP SKSNzx1TSAuCsOPTz9iVq3GkcNH867tSt8ji9bdIYIecrg/zz6FmTzSbtlzxQRDm 8aLxPz+qy2WXQWHzvHInFfVvjiUDKPsf3NO5D89O/UZd3tnyZu8QCAX3XzSj1+KH m5N/O7psw8sRs4D6ZIUPcVsYbTsIbV9eD+0FEdqYdnPuj2ku6k75Qi8z6wHHkt2S 9RVya6tH0I19vnWK8KrwWwj7bwWFMW8YMDlIEBQQjAcmQfF304huYHfCRZBoXoJx aH4zmWLaYShFiqlR72eb2B3fBjAUOfRMVtUFfq1qE4uwIw7mIIdgnO600n45POPO TZ5UJ82hO1UafKTeU6VmOxosJwVccIVvL5Q7KIbep1Q0KFtpeJUknm7RfDeJjyt9 cFKohusrw44DozWY9vlPhDxZXjJl9GAXFhb6e8CcUtQTQmgOALEpp9oAOCErpsU4 wuHUUF4QEWaa6iRsgGy2iE/aBsaNib3ByAUMIJx0GtUq19ZX0QlLhs6ROfKF05bx mdSoYKf8da8= =9DcN -----END PGP SIGNATURE----- --==_Exmh_1594692923_174210P-- --===============8464614567457368457== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============8464614567457368457==--