Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1716127rwe; Fri, 2 Sep 2022 02:33:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR48ukfnN34oDMCcxsHujLGB/WbW4tn75WrFOw7zTgts+TWAu3ouUwe4kb52cub01DfA0CfY X-Received: by 2002:a05:6402:1a50:b0:447:e8b3:be1e with SMTP id bf16-20020a0564021a5000b00447e8b3be1emr28154562edb.361.1662111213204; Fri, 02 Sep 2022 02:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662111213; cv=none; d=google.com; s=arc-20160816; b=gp2XJZRYoTxO6CStUMCGCNOgC0bw09qwQIWAoYw8znCLokEtsf2GigfzsQVFogyGk5 oyfrTXH8BvIVbh+VHr8vRIBH8CfkMqT31/jKIeOd3A0nBKt/0Ff52y0vyoHSQJJ/m7Gq QGPstUoXHqrfuAWUV02aXYom6cL0PPaaHrBryBRqIBBdwZpInOqMuXBG+r8upDUMDVJq d2/hzgzC7oi0Ar9QX2TRfgFWnoeGfxo0+JiqDEMVn5ONZz8r5ERfKahmnQgpsn8k7s6m UnJpPU2zJ/9S/ElHyXIXEqhyGdlKCy/c84m4nIqF//lR/hZlfl0PO3kWcVnZV93Z1sOt jejA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=A0lRx9LcG2f6vdkkySTxdBxFyRczSLUlrhv0k8CVfMQ=; b=OaMdA4StTu3u+Cc9BGKsvQ9Sqnfo89kgIGjhqYyYI91p/W1WbYNw8Fvm3b/hbQc1Yo JgVrCxtc2iY95qXauaHMS7BeRhqunVxegDz2YiXA7GQOcTI5+crbbsT2G9uxDHQck1cV 7MAlGSP7N3+o+qUYHGj1ePxjq6vC0d6mhZmg3uhaLhZknwd/3bIzjlYYcLsdm2SQPOE6 iDCr4mYQESM5Ne15vxHjkiwQ2LIfpbqCVMBqj1Oc6c3zbIh6liPtJFaDTmxjzUIhHtbT +pVS3w+x608Dp+JHj9mMvLd/JtUR93IkAyCgVgamGqQXU0pUd2cA1PHz1xy6sp/H9Xyy napw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PqG6a4MK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw31-20020a1709066a1f00b007316ac034a1si1411917ejc.831.2022.09.02.02.33.07; Fri, 02 Sep 2022 02:33:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PqG6a4MK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235583AbiIBJFI (ORCPT + 99 others); Fri, 2 Sep 2022 05:05:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236088AbiIBJE5 (ORCPT ); Fri, 2 Sep 2022 05:04:57 -0400 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F91C1057F for ; Fri, 2 Sep 2022 02:04:56 -0700 (PDT) Received: by mail-qt1-x836.google.com with SMTP id x5so970602qtv.9 for ; Fri, 02 Sep 2022 02:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=A0lRx9LcG2f6vdkkySTxdBxFyRczSLUlrhv0k8CVfMQ=; b=PqG6a4MKk2roT2Ce/PJEt8kCVddWYbqLQh141ATH+SE8SYCKK/ZFS9/OCHdfbfSgP8 mQREKuMuSelAb6SBLEEu74TKUjSBBmwZ8WjygarTrIA/KvHYGyMp8a2J70T92Jg3Pcrb kcjEtRkQqjOXCQllUJDzs4CbTXcsIuMEFmKFSormg00PlTnX1F1InK7vkFbhfO4twbjw wX8s3+vO/eXcBlAlq1ZPFwMRXYokbFEoLvKUt2HuPvjJ+iL9BHtDGUWj4Z7VTMBrr1UC L7HTZSBcu84jPm1mYMiEOrw0O3Q0JaNpk4QrVKItYAbCjz/FlYGhDCg+mGNEqLY5iH3A 0oww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=A0lRx9LcG2f6vdkkySTxdBxFyRczSLUlrhv0k8CVfMQ=; b=OddTsxKWlZVwlZaO+UZXNq+LjKgLLjZ3zuicp5+w+OoOS2izx1kwHTgPTBj0UWRm8G tfmVxgoWAOaV7mK5FQGLCoqemHkYfRzYMfdmifrin+ZchRwtAwrRSsr0iGndI2tTUVRn jOHmqAbccRbHCBJNNEab21PnDB3YYi5T/UzxwFF86g4UBE78fT1bLgUE1LQcp08Fsn/c Fnb+r4T1XhOdLegskFhWmvBMzd8eTkvHa9Pg4z+rKzC7xemI0yYEMNcwdSHJ+CsC5Fol ySOieGgd74HA0nBZLlEKp8v7nI4uAIpx07hnsrFVBiTd6czJNAhhwJfGVlHFguTmgZLt 08gg== X-Gm-Message-State: ACgBeo1FRElTGUwwAKhDbdmi8VEr+asNP0A9KTTybwEhcoTAepfbru/v GPhcHlnQNkvdddayCyPatMIAQOTqMRqHANL1iks= X-Received: by 2002:ac8:7dd0:0:b0:344:afc1:b11d with SMTP id c16-20020ac87dd0000000b00344afc1b11dmr26659521qte.195.1662109495202; Fri, 02 Sep 2022 02:04:55 -0700 (PDT) MIME-Version: 1.0 References: <20220901175022.334824-1-cezary.rojewski@intel.com> <20220901175022.334824-2-cezary.rojewski@intel.com> In-Reply-To: From: Andy Shevchenko Date: Fri, 2 Sep 2022 12:04:19 +0300 Message-ID: Subject: Re: [PATCH v3 1/2] lib/string_helpers: Introduce tokenize_user_input() To: Cezary Rojewski Cc: ALSA Development Mailing List , Mark Brown , Takashi Iwai , Jaroslav Kysela , amadeuszx.slawinski@linux.intel.com, Pierre-Louis Bossart , Hans de Goede , Liam Girdwood , Kai Vehmanen , =?UTF-8?Q?P=C3=A9ter_Ujfalusi?= , Ranjani Sridharan , Bard Liao , Andy Shevchenko , Linux Kernel Mailing List , Matthew Wilcox Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 2, 2022 at 10:46 AM Cezary Rojewski wrote: > On 2022-09-01 9:34 PM, Andy Shevchenko wrote: > > On Thu, Sep 1, 2022 at 8:40 PM Cezary Rojewski > > wrote: ... > >> +int tokenize_user_input(const char __user *from, size_t count, int **tkns); > > > > Not sure how I can deduct from the name what function is actually > > doing. Suggested new name: int_array_parse_user(). > > > > int int_array_parse_user(const char __user *from, size_t count, int **array); > > > > (Note that we have _user suffix for many APIs in the kernel that does > > interact with user space memory) > > That's why I've added '_user_' in the middle! Anyway, I guess the > expectation is that it's a suffix - precisely at the end of the name. > > Could we reorder it a bit: "parse_int_array_user"? Most of the exported functions that have 'parse' word, have it after namespace, but in this case there is no dedicated namespace and it also will be in alignment with parse_options_str. That said, go for it. -- With Best Regards, Andy Shevchenko