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=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 6970CC04AB4 for ; Mon, 20 May 2019 00:09:19 +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 01AB720675 for ; Mon, 20 May 2019 00:09:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rtHel/ms" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01AB720675 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1hSVrN-00071y-2p; Sun, 19 May 2019 20:08:57 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1hSVrL-00071p-Ci for kernelnewbies@kernelnewbies.org; Sun, 19 May 2019 20:08:55 -0400 Received: by mail-wm1-x331.google.com with SMTP id j187so11245786wmj.1 for ; Sun, 19 May 2019 17:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Y4aFGRFM7IoElS4onEAqlfOyDdbLJ9sxzE/g/SrJbBU=; b=rtHel/msBiB2xJmNPyL7n5HuM1BFAVBNgrC3SbPCZsqcRkeqimlEET1TC09mPOciWl qzh0dzXhvGe3QtV2dFbn2AFfPYoH8dCs9krQBq+oPbwTKPRPYBCgAx2QTsAdurE0oB3K zCdc19rzARQZQWfZ9UPYNgxMFkq8q/K0uOaLQkTtBAuw/OkXNAMMo2E6mxQidKnZUBNV zTevmrVKwl5ogofb9tqTa5Ivnyb/LRar/ZL70lWqgP8T52Mjrr4skM/VfOAdtNVhn+5W awCnjMLoRTV60nN6peiZvvqxrpg0vp/M925ubU3q4Lx9/v28FGeYmlp8n1y0eT/lXT/y x0WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Y4aFGRFM7IoElS4onEAqlfOyDdbLJ9sxzE/g/SrJbBU=; b=oLNvvkksus+VYVFgLu7j/MlTSJGexA9EvuTFjTGckKDpoME7lXcyOpvRP1T9FEjd6a 8Ezsqhn9NNlVYugE/YbBus7Qg/l5kqVbseI8b7R8fohhKn88hwR3BPd5+aLhNNQfX12R nzmxGPpU7hqBtrs+kyig1ElG61TjlxLTsthKayy7dQoeFOnohR1ik7cHHRXKFRWEtsl4 bL8Iql1dwzMlZ9OhPmctXP/HbWK+IRXHlACGzQw28xXW08YJxyYOhGAyJ9/XOeOhPT3l QVHypLuU+bGOFXo00qdLw7asQgsIx+XR2O6FE/XwYXQjYQzeHrlc/0lri9yifJD3BdLT yz4Q== X-Gm-Message-State: APjAAAUmx0dUG56Uyj1nHozLjnxntxLiMQ4LQrGppLZhR5x3ISUnT3Iv w8PjY6h195N48aSUicD/Oy1kHMOLDrKRlcmd57c= X-Google-Smtp-Source: APXvYqw+pyQqrAiFSyppdLPq30ehnpvI+tB/5DhiTyp5WuiBCA3NNMCVnJZPKCfG5nRx9huzReDIN2v4lH5OhTvpj14= X-Received: by 2002:a1c:f507:: with SMTP id t7mr6530015wmh.149.1558310873090; Sun, 19 May 2019 17:07:53 -0700 (PDT) MIME-Version: 1.0 From: Amit Kumar Date: Mon, 20 May 2019 05:37:41 +0530 Message-ID: Subject: Unable to understand a piece of code To: linux-newbie@vger.kernel.org, Kernel Newbies 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org HI, mm/slub.c: line 3973 int __kmem_cache_shrink(struct kmem_cache *s) { int node; int i; struct kmem_cache_node *n; struct page *page; struct page *t; struct list_head discard; struct list_head promote[SHRINK_PROMOTE_MAX]; unsigned long flags; int ret = 0; flush_all(s); for_each_kmem_cache_node(s, node, n) { How uninitialized variable node is being used in macro for_each_kmem_cache_node? node is a local variable with no extern and not initialized. mm/slab.h: line 490 #define for_each_kmem_cache_node(__s, __node, __n) \ for (__node = 0; __node < nr_node_ids; __node++) \ if ((__n = get_node(__s, __node))) As we see for loop is based on node. Thanks in advance. Regards, Amit Kumar _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies