cregit-Linux how code gets into the kernel

Release 4.16 drivers/block/aoe/aoemain.c

/* Copyright (c) 2012 Coraid, Inc.  See COPYING for GPL terms. */
/*
 * aoemain.c
 * Module initialization routines, discover timer
 */

#include <linux/hdreg.h>
#include <linux/blkdev.h>
#include <linux/module.h>
#include <linux/skbuff.h>
#include "aoe.h"

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Sam Hopkins <sah@coraid.com>");
MODULE_DESCRIPTION("AoE block/char driver for 2.6.2 and newer 2.6 kernels");
MODULE_VERSION(VERSION);


static struct timer_list timer;


static void discover_timer(struct timer_list *t) { mod_timer(t, jiffies + HZ * 60); /* one minute */ aoecmd_cfg(0xffff, 0xff); }

Contributors

PersonTokensPropCommitsCommitProp
Ed L. Cashin2376.67%150.00%
Kees Cook723.33%150.00%
Total30100.00%2100.00%


static void aoe_exit(void) { del_timer_sync(&timer); aoenet_exit(); unregister_blkdev(AOE_MAJOR, DEVICE_NAME); aoecmd_exit(); aoechr_exit(); aoedev_exit(); aoeblk_exit(); /* free cache after de-allocating bufs */ }

Contributors

PersonTokensPropCommitsCommitProp
Ed L. Cashin3491.89%375.00%
Kees Cook38.11%125.00%
Total37100.00%4100.00%


static int __init aoe_init(void) { int ret; ret = aoedev_init(); if (ret) return ret; ret = aoechr_init(); if (ret) goto chr_fail; ret = aoeblk_init(); if (ret) goto blk_fail; ret = aoenet_init(); if (ret) goto net_fail; ret = aoecmd_init(); if (ret) goto cmd_fail; ret = register_blkdev(AOE_MAJOR, DEVICE_NAME); if (ret < 0) { printk(KERN_ERR "aoe: can't register major\n"); goto blkreg_fail; } printk(KERN_INFO "aoe: AoE v%s initialised.\n", VERSION); timer_setup(&timer, discover_timer, 0); discover_timer(&timer); return 0; blkreg_fail: aoecmd_exit(); cmd_fail: aoenet_exit(); net_fail: aoeblk_exit(); blk_fail: aoechr_exit(); chr_fail: aoedev_exit(); printk(KERN_INFO "aoe: initialisation failure.\n"); return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Ed L. Cashin14792.45%480.00%
Kees Cook127.55%120.00%
Total159100.00%5100.00%

module_init(aoe_init); module_exit(aoe_exit);

Overall Contributors

PersonTokensPropCommitsCommitProp
Ed L. Cashin24889.21%777.78%
Kees Cook279.71%111.11%
David S. Miller31.08%111.11%
Total278100.00%9100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.