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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 40AF7C32771 for ; Mon, 6 Jan 2020 08:25:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 167B1215A4 for ; Mon, 6 Jan 2020 08:25:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725945AbgAFIZ3 (ORCPT ); Mon, 6 Jan 2020 03:25:29 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:41081 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgAFIZ3 (ORCPT ); Mon, 6 Jan 2020 03:25:29 -0500 Received: by mail-ot1-f66.google.com with SMTP id r27so70670798otc.8; Mon, 06 Jan 2020 00:25:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ER0D8uLY6YrhMkJyHQ/GT99IuQuzHZUvBL1W09DRdAg=; b=pf1Ty90FiqA2iI0LugY5VUDx/q/ck0agNdQw3oIttCBE9vomNyH5wDfrq9V8bbGxBt g3Z3lgdFCO/TER8hb3Ew4p6m+tVnWeJUrVLBzXTuMftn8nPGHYE+NbOCmjW8WpClVgai 8BGwKQpzVM9jC5CwwU3EuU/zpndMYveZLh2rEfA6wVh02XBSqhNhVsiamyzWa9TMQueZ I9yjo59pZFuIceC+FBesLAkeX4CdpzhJOBzVEDHCfoDrCUEJXaGJ9/gX8KfjPPm5YRBi 2+uEGjLzKcPuSJFEhr+1EnNcZ3Q+ZDeFNPkX+b/gNhOuUOAlow61eVxHNTEEETFej1AJ QLvA== X-Gm-Message-State: APjAAAVUWfz+sbbMXGc9qGfo/DN+vLWufpHoa9hipmOSCE9d8do/En6u 3BvNmxMNBcCQ+RW5+M+s1qhzDeTt90XwU/4Ydag= X-Google-Smtp-Source: APXvYqxqroOzVgFccWaYEJ6YI4j2kXb3vJtV7OZxBLL9aX3s9gQlKW0z4k7217yD3+wKRX9wHnDrqebUDBOnX6E3wHw= X-Received: by 2002:a05:6830:68a:: with SMTP id q10mr12495545otr.145.1578299127870; Mon, 06 Jan 2020 00:25:27 -0800 (PST) MIME-Version: 1.0 References: <20191217184242.827-1-geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 6 Jan 2020 09:25:16 +0100 Message-ID: Subject: Re: [PATCH] pinctrl: sh-pfc: Split R-Car H3 support in two independent drivers To: Yoshihiro Shimoda Cc: Linus Walleij , "REE erosca@DE.ADIT-JV.COM" , "linux-renesas-soc@vger.kernel.org" , "linux-gpio@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hi Shimoda-san, Happy New Year, On Mon, Jan 6, 2020 at 9:20 AM Yoshihiro Shimoda wrote: > > From: Geert Uytterhoeven, Sent: Thursday, December 26, 2019 11:34 PM > > > > > Suggestions for simplifying sh_pfc_quirk_match(), or for alternative > > > > solutions are welcome! > > > > > > I wondered if using weak attribute on both info variables could > > > simplify sh_pfc_quirk_match(), but such a code [1] doesn't seem better > > > than using #ifdef. Also, using weak attributes waste data size > > > if R8A77950=n and R8A77951=y for instance. > > > > Thanks for the great suggestion! > > > > The trick is to add __weak to the existing extern declarations in sh_pfc.h, > > instead of adding weak empty structs. > > When the structs don't exist, their addresses just become zero. > > I'm happy my suggestion is useful! > # I didn't know the trick though :) > > > So I came up with the following (whitespace-damaged) patch, which I intend > > to fold into the original, if no one objects. > > The v2 patch [1] is better than v1! I'm happy you like it. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds