Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5959603pxb; Thu, 27 Jan 2022 03:29:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQL/YVH70cf85fVf+Xm4wJy4aLPf9rPsh5/TkRDMhhagMnty5Mq2w5iBwa4IobJRMiwVDU X-Received: by 2002:aa7:d312:: with SMTP id p18mr3074118edq.49.1643282994444; Thu, 27 Jan 2022 03:29:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643282994; cv=none; d=google.com; s=arc-20160816; b=rnmAtPwIepu4rGjUnBZ8D3p4GQYH8N97V4IpW6BsYCDz0A0fjeUsFBBZ+rX29goBK7 wpPKoao1KuiPUa+mGKTBY50W09bKoRMk0qOizPWUf6yph+ucllsFIaoJQ6P4NFjzmakr ni94/iRH+xeBf9gJ11ufnmuhBsAYqQ6xKUcJ7xQPsuC0/qkoml2m9nrwN7V4KMaTOvbx BcV38OXfXSLmLRin1m0sSffHhCm+bDmUfB7VfktOmzV0p00b0/FgdcljqzrnfleXJhrO n/RgmD5eItxx3TKDDooQnzWfBv0Wyf3KjNOfc3XH4Ubv8HK2bZkdJnyx9rQnPVKJ/XJZ 4s0g== 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=y7Yfdd/9hFQUnA6nIuJDN3HjbLQ4BcpXzeTNQx2T/6Q=; b=VKm/Yh/mASjA1maDqkAXnLtV6pmQABL4xh4CvbMyL1vYigzPED11Ne7VMa/S3Rmlcx yZZ1a3qvvMJbTvffxROegqwWJk0vm8958QfMx/+PTUSjMufzImtaMaDXojZfFJ9FDzfS kb2wFDysykLzuauK7JPwKHdm3I6tEBM2HQ4pKksqIBkNz13QRNMItsyCa0Miju7eivLG +uUTNK/uq0hq5/9jhpxypNU3YvDhEp/7I2TeIRZnvXoN7NB+zGSIP4FlKqrwdeN/rtLX PHjbkjmLTG+SIcmDzlkBF/tI3VhDqduHQjTyQ844hfCXads9A1VadD7jOYa55NIZoz5B mbyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=aLgMx615; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si1210059edo.386.2022.01.27.03.29.29; Thu, 27 Jan 2022 03:29:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=aLgMx615; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235818AbiA0Dhr (ORCPT + 99 others); Wed, 26 Jan 2022 22:37:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235788AbiA0Dhq (ORCPT ); Wed, 26 Jan 2022 22:37:46 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C81AC06173B for ; Wed, 26 Jan 2022 19:37:46 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id q9-20020a7bce89000000b00349e697f2fbso5030811wmj.0 for ; Wed, 26 Jan 2022 19:37:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y7Yfdd/9hFQUnA6nIuJDN3HjbLQ4BcpXzeTNQx2T/6Q=; b=aLgMx6151pR0phggn9dWcxEp7UBNHx7Kzc8wyBpjngCPGx3sGAbKeZrAso7mr/fHYL 2STYT2whequsx1lFvX8aBDoW/hOtDEfr8jiskmdPHHp5/U+0gY+gAqY8K57R7wnuNhN+ IGLQFn+Mt8wwf2YzLKszKuEwUONfAQStjs0QqlMqdRjABIuuPpPPAw8mnihgpfn5Ys2r NcA44W00Sma7A4uBzjxmMkME3YgoJk8OsRTLX02cxvblOayMn57oLg8/sdYUZtOTQzRJ qRczPkFNsBWQCr5ArJre4DffDFMcQd4ozenginpevzLma3dBm5hmj4p4y+KfpTI6PL4A Ma7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y7Yfdd/9hFQUnA6nIuJDN3HjbLQ4BcpXzeTNQx2T/6Q=; b=NWpUJtOYlruLSRFGdsPfqhb6Xzqs4o2EYJP1NAeg76jc1TzUdczBOJNa3u5SMGU+8J es61kFZ5ZZSGIp0EzUyF+snpLfEY48/arvcVLJfKgG3AvjaGeqN1LhH0RxAHCUjTOwMP 1AGIs+7sruetYKoZjOCUdSKnKoZ9o9Y/HY0wrTCVOHjI4DAL4Mvm0fn6dLvVqZ3goKCv GGiywSOfowYNxtW9KtMgqHFNRlRNmYjk58l78ftK+1Wyp+XEkxY2uOL2+rX3GT9Kij9G eW+/tn/6YzDbZxhSZrWXniGtIvksRNGwo6jY6u7vRwasKwXF0xxlXO3ZLqiWIYYfoA/b pj9A== X-Gm-Message-State: AOAM533SsI5hVqiUlCLrTGDGpeb67byyG5dHTvoNvcRN3N2alk6ArVJK 3tx6PaMv3QyMPSXlp9blRfrP0RgRmUd+v5km0tSMIw== X-Received: by 2002:a05:600c:4e16:: with SMTP id b22mr1474557wmq.8.1643254664899; Wed, 26 Jan 2022 19:37:44 -0800 (PST) MIME-Version: 1.0 References: <20220125210011.3817742-1-dlatypov@google.com> <20220125210011.3817742-3-dlatypov@google.com> In-Reply-To: From: David Gow Date: Thu, 27 Jan 2022 11:37:33 +0800 Message-ID: Subject: Re: [PATCH 2/3] kunit: consolidate KUNIT_INIT_BINARY_ASSERT_STRUCT macros To: Daniel Latypov Cc: brendanhiggins@google.com, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 11:36 AM David Gow wrote: > > On Wed, Jan 26, 2022 at 5:00 AM Daniel Latypov wrote: > > > > We currently have 2 other versions of KUNIT_INIT_BINARY_ASSERT_STRUCT. > > The only differences are that > > * the format funcition they pass is different > Minor nit: s/funcition/function/ > > * the types of left_val/right_val should be different (integral, > > pointer, string). > > > > The latter doesn't actually matter since these macros are just plumbing > > them along to KUNIT_ASSERTION where they will get type checked. > > > > So combine them all into a single KUNIT_INIT_BINARY_ASSERT_STRUCT that > > now also takes the format function as a parameter. > > > > Signed-off-by: Daniel Latypov > > --- > > Makes sense to me. > > One minor spelling nit: probably not worth a whole new version over, > but if v2 ever happens, worth fixing at the same time... > Oops, forgot to add the Reviewed-by! Reviewed-by: David Gow > -- David >