diff options
Diffstat (limited to 'drivers/scsi/snic/snic_trc.c')
| -rw-r--r-- | drivers/scsi/snic/snic_trc.c | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/drivers/scsi/snic/snic_trc.c b/drivers/scsi/snic/snic_trc.c index f00ebf4717e0..6bad1ea9a6a7 100644 --- a/drivers/scsi/snic/snic_trc.c +++ b/drivers/scsi/snic/snic_trc.c @@ -1,19 +1,5 @@ -/* - * Copyright 2014 Cisco Systems, Inc. All rights reserved. - * - * This program is free software; you may redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// SPDX-License-Identifier: GPL-2.0-only +// Copyright 2014 Cisco Systems, Inc. All rights reserved. #include <linux/module.h> #include <linux/mempool.h> @@ -65,14 +51,13 @@ static int snic_fmt_trc_data(struct snic_trc_data *td, char *buf, int buf_sz) { int len = 0; - struct timespec tmspec; + struct timespec64 tmspec; - jiffies_to_timespec(td->ts, &tmspec); + jiffies_to_timespec64(td->ts, &tmspec); len += snprintf(buf, buf_sz, - "%lu.%10lu %-25s %3d %4x %16llx %16llx %16llx %16llx %16llx\n", - tmspec.tv_sec, - tmspec.tv_nsec, + "%ptSp %-25s %3d %4x %16llx %16llx %16llx %16llx %16llx\n", + &tmspec, td->fn, td->hno, td->tag, @@ -126,7 +111,7 @@ snic_trc_init(void) int tbuf_sz = 0, ret; tbuf_sz = (snic_trace_max_pages * PAGE_SIZE); - tbuf = vmalloc(tbuf_sz); + tbuf = vzalloc(tbuf_sz); if (!tbuf) { SNIC_ERR("Failed to Allocate Trace Buffer Size. %d\n", tbuf_sz); SNIC_ERR("Trace Facility not enabled.\n"); @@ -135,16 +120,10 @@ snic_trc_init(void) return ret; } - memset(tbuf, 0, tbuf_sz); trc->buf = (struct snic_trc_data *) tbuf; spin_lock_init(&trc->lock); - ret = snic_trc_debugfs_init(); - if (ret) { - SNIC_ERR("Failed to create Debugfs Files.\n"); - - goto error; - } + snic_trc_debugfs_init(); trc->max_idx = (tbuf_sz / SNIC_TRC_ENTRY_SZ); trc->rd_idx = trc->wr_idx = 0; @@ -154,11 +133,6 @@ snic_trc_init(void) ret = 0; return ret; - -error: - snic_trc_free(); - - return ret; } /* end of snic_trc_init */ /* |
