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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 EC0ACC4338F for ; Thu, 29 Jul 2021 03:47:43 +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 8AAE160FE7 for ; Thu, 29 Jul 2021 03:47:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8AAE160FE7 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.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1m8x1K-0007tn-8b for kernelnewbies@archiver.kernel.org; Wed, 28 Jul 2021 23:47:42 -0400 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1m8wzS-0005jy-UV for kernelnewbies@kernelnewbies.org; Wed, 28 Jul 2021 23:45:46 -0400 Received: by mail-qv1-xf2d.google.com with SMTP id g6so2733095qvj.8 for ; Wed, 28 Jul 2021 20:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vt-edu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:in-reply-to:references:mime-version :content-transfer-encoding:date:message-id; bh=q+M49PeUBQuimyfvlL2nW1+4dQ9ei8Trpuf8eE4YbM8=; b=DBHW7JbxkjNZWSm7EUDALgNEXmMWuTTxsYpEpHufG8yrRDPI/0JAnihnpTVi4ymGSJ omWt2yLreSfqCougJ3fc4jJKWB8W9Aa0YQEVEPDufKCrmoaPpMjSFDRJUwJFQBlC8pb6 NpCZa21HrOocWYoXJzCALs0NHq0oVZ4X4lmp25qIhSiK2kttedFHzN4r+vrGl6FZ68Fp 6G9IVSeE0BaYDR+eafXQSOfDNk8Z7tCeQhzD6xx7PZu92Ch+0UIlFHpIS43xwfnOj3wR jCDSoe92/qCoq9xom4TGwo3zLbGeCQC6kWfADH9CAo7kNvnn2axz4NBFgsJFMO1DT8+3 zBVA== 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=q+M49PeUBQuimyfvlL2nW1+4dQ9ei8Trpuf8eE4YbM8=; b=ILmlUsdemQOhomNUsh8InP+MaP/1D3+emhuyYr2j/uKr/EceL0pzd2GaMi80jVFYiK KZeu3ql9cFolpmR8WrGZKiOLH/8xfmT+T2pD3Yn6a0yro3KOp++o1pAPE+Pg8l8XlFpw Z0Ex3ReNwaN5cvIPBYnQRvQry2zkMdBaV8aHf2zKsn5Rr36SpA5OEgSwfDm8dabvRYGG oMlz1i8gKXSB46fYfKUk70K+ZnZw/9/tgXYZhFvslJgbx8DhdDwKYNBPuubR0phAnnxB 9+q3FVns23L06Y3AlB4kcMonkGf/BOGMJwQXF4jgXShszkgacViv42YJ39Rfc1TF5ALr OQDQ== X-Gm-Message-State: AOAM533MKfY+Zp3fTd0XbssVPerA53DQLEPh+e9z8M7U58bVYJ7tNLwp KmecLreW4PEUPZ5hg3je/C+SdQ== X-Google-Smtp-Source: ABdhPJysJZIKEpENTPU/YLbX7Tm2/poR8pYLaphKwoor/Cj6xoHYNQCDaKSB+bWFBTBUPMQt7VD/Rg== X-Received: by 2002:a05:6214:1909:: with SMTP id er9mr3484278qvb.26.1627530344263; Wed, 28 Jul 2021 20:45:44 -0700 (PDT) Received: from turing-police ([2601:5c0:c380:d61::359]) by smtp.gmail.com with ESMTPSA id bk3sm1071780qkb.103.2021.07.28.20.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 20:45:43 -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.10.0-pre 07/05/2021 with nmh-1.7+dev To: Ian Pilcher Subject: Re: [RFC PATCH 3/8] block: Add kernel APIs to create & delete block device LED triggers In-Reply-To: <20210729015344.3366750-4-arequipeno@gmail.com> References: <20210729015344.3366750-1-arequipeno@gmail.com> <20210729015344.3366750-4-arequipeno@gmail.com> Mime-Version: 1.0 Date: Wed, 28 Jul 2021 23:45:34 -0400 Message-ID: <110419.1627530334@turing-police> Cc: axboe@kernel.dk, kernelnewbies@kernelnewbies.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, pavel@ucw.cz, linux-leds@vger.kernel.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="===============0956926595792709640==" Errors-To: kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org --===============0956926595792709640== Content-Type: multipart/signed; boundary="==_Exmh_1627530334_13589P"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1627530334_13589P Content-Type: text/plain; charset=us-ascii On Wed, 28 Jul 2021 20:53:39 -0500, Ian Pilcher said: > * New file - include/linux/blk-ledtrig.h > > Signed-off-by: Ian Pilcher > --- > block/blk-ledtrig.c | 152 ++++++++++++++++++++++++++++++++++++ > include/linux/blk-ledtrig.h | 19 +++++ > 2 files changed, 171 insertions(+) > create mode 100644 include/linux/blk-ledtrig.h > > diff --git a/block/blk-ledtrig.c b/block/blk-ledtrig.c > index 345a3b6bdbc6..c69ea1539336 100644 > --- a/block/blk-ledtrig.c > +++ b/block/blk-ledtrig.c > + > +static int __blk_ledtrig_create(const char *const name, const size_t len) (...) + if (blk_ledtrig_find(name, len) != NULL) { + pr_warn("blockdev LED trigger named %.*s already exists\n", + (int)len, name); Is pr_warn() the right level for this stuff? I'd think this sort of pilot error should be pr_info() or even pr_debug(), if mentioned at all. pr_warn() would be for something like an unexpected situation like trying to blink an LED but failing. Simple syntax errors should probably just toss a -EINVAL and return. (Among other things, this allows a userspace script to spam the log by simply repeatedly trying to create the same entry) --==_Exmh_1627530334_13589P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQEcBAEBCAAGBQJhAiRdAAoJEI0DS38y7CIcKHMH/idwruZ9tURrsesbgrgquzXZ yyBAlzWUAMPlJ0jWJ4OSshKeEVs60pYdHXmZyuPQaag7RiXUG0b720YIy0pSV+Fx kbi6edyt1ZDRsEC10nLhdHn5AgxiNvMe1gP5wBZU0VUzVBbY4kICVjc0I1KIKLz6 4cTCrlAN2dqufTetLUWnvjz8aQXhubvC0Xg18p9cDAEbpCVBAb6FwZ736eC/yppy 8+V0q4mg/pyN+t2PpVbtMRL2xNwz1UtwyDBNEu872YVP+jL9wp2z7+QM/vNR8Kj7 HcumxINpEpHcviLwYyqlsd+Vylb6B3EW3xzy/q3+u/x0sobJMNjAsyirkI+5XYk= =HwId -----END PGP SIGNATURE----- --==_Exmh_1627530334_13589P-- --===============0956926595792709640== 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 --===============0956926595792709640==--