Drop support for kernels < 3.0 from skb instrumentation
[lttng-modules.git] / wrapper / genhd.h
index 4184bd011d3e9dc8c23c607cbf7f379abe4f3bf2..a44198a7eb138f6698c7495ccb059a0370a91026 100644 (file)
@@ -1,7 +1,5 @@
-#ifndef _LTTNG_WRAPPER_GENHD_H
-#define _LTTNG_WRAPPER_GENHD_H
-
-/*
+/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
+ *
  * wrapper/genhd.h
  *
  * wrapper around block layer functions and data structures. Using
@@ -9,22 +7,11 @@
  * kernel that exports this function to GPL modules.
  *
  * Copyright (C) 2011-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; only
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#ifndef _LTTNG_WRAPPER_GENHD_H
+#define _LTTNG_WRAPPER_GENHD_H
+
 #include <linux/genhd.h>
 
 #ifdef CONFIG_KALLSYMS
@@ -41,7 +28,7 @@ char *wrapper_disk_name(struct gendisk *hd, int partno, char *buf)
        if (disk_name_sym) {
                return disk_name_sym(hd, partno, buf);
        } else {
-               printk(KERN_WARNING "LTTng: disk_name symbol lookup failed.\n");
+               printk_once(KERN_WARNING "LTTng: disk_name symbol lookup failed.\n");
                return NULL;
        }
 }
@@ -65,7 +52,7 @@ struct class *wrapper_get_block_class(void)
 
        ptr_block_class = (struct class *) kallsyms_lookup_dataptr("block_class");
        if (!ptr_block_class) {
-               printk(KERN_WARNING "LTTng: block_class symbol lookup failed.\n");
+               printk_once(KERN_WARNING "LTTng: block_class symbol lookup failed.\n");
                return NULL;
        }
        return ptr_block_class;
@@ -78,7 +65,7 @@ struct device_type *wrapper_get_disk_type(void)
 
        ptr_disk_type = (struct device_type *) kallsyms_lookup_dataptr("disk_type");
        if (!ptr_disk_type) {
-               printk(KERN_WARNING "LTTng: disk_type symbol lookup failed.\n");
+               printk_once(KERN_WARNING "LTTng: disk_type symbol lookup failed.\n");
                return NULL;
        }
        return ptr_disk_type;
This page took 0.023597 seconds and 4 git commands to generate.