From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751617AbbIKJpq (ORCPT ); Fri, 11 Sep 2015 05:45:46 -0400 Received: from s3.sipsolutions.net ([5.9.151.49]:35857 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbbIKJpp (ORCPT ); Fri, 11 Sep 2015 05:45:45 -0400 Message-ID: <1441964735.2083.4.camel@sipsolutions.net> Subject: static key arrays? From: Johannes Berg To: Peter Zijlstra , Jason Baron Cc: linux-kernel Date: Fri, 11 Sep 2015 11:45:35 +0200 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, Jason, all, Per the recent type-safe API changes, it's no longer easy to generate an array of static keys. I was planning to do that for a set of very unlikely debug options. It sounds like you're planning to remove the previous API entirely at some point, so I'm wondering if you've given any thought to this possibility. I briefly played with the idea of adding a macro for that, but the necessary "REPEAT(n, d)" macro for the initialisation becomes ugly pretty quickly and, afaict, needs to have enough macros for the maximum expected numbers. For the case I was looking at it's static_key_false so a zero -initialized array would be sufficient, but that can't be done easily with a static_key_true. johannes