Staging: lustre: Remove unused code
cover Staging: lustre: Remove unused code
These patches remove unused header file, function definition and declarations and EXPORT_SYMBOL for static function
Shraddha Barke (4):
Staging: lustre: include: Remove unused obd_cache.h file
Staging: lustre: lustre_log: Remove unused functions
Staging: lustre: ptlrpc: Remove EXPORT_SYMBOL for
sptlrpc_rule_set_expand
Staging: lustre: lprocfs_status: Remove unused declaration
.../staging/lustre/lustre/include/lprocfs_status.h | 2 - drivers/staging/lustre/lustre/include/lustre_log.h | 89 ---------------------- drivers/staging/lustre/lustre/include/obd_cache.h | 38 --------- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 1 - 4 files changed, 130 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/obd_cache.h
Signature · 1 line
2.1.4
PATCH 1/4 Staging: lustre: include: Remove unused obd_cache.h file
Remove the header file obd_cache.h since it is not needed
--- drivers/staging/lustre/lustre/include/obd_cache.h | 38 ----------------------- 1 file changed, 38 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/obd_cache.h
drivers/staging/lustre/lustre/include/obd_cache.h deleted +0 -38
@@ -1,38 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* This program 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 -* General Public License version 2 for more details (a copy is included -* in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU General Public License -* version 2 along with this program; If not, see -* http://www.sun.com/software/products/lustre/docs/GPLv2.pdf -* -* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -* CA 95054 USA or visit www.sun.com if you need additional information or -* have any questions. -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. -* Use is subject to license terms. -*/ -/* -* This file is part of Lustre, http://www.lustre.org/ -* Lustre is a trademark of Sun Microsystems, Inc. -*/ - -#ifndef _OBD_CACHE_H__ -#define _OBD_CACHE_H__ - -#endif
Signature · 1 line
2.1.4
Greg KH
maintainerRe: [Outreachy kernel] [PATCH 1/4] Staging: lustre: include: Remove unused obd_cache.h file
Quoted 5 lines · Shraddha Barke
Remove the header file
obd_cache.hsince it is not needed--- drivers/staging/lustre/lustre/include/obd_cache.h | 38 ----------------------- 1 file changed, 38 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/obd_cache.h
No signed-off-by: line :(
PATCH 2/4 Staging: lustre: lustre_log: Remove unused functions
In reply to Shraddha BarkeRemove the functions which are defined but not used anywhere
--- drivers/staging/lustre/lustre/include/lustre_log.h | 89 ---------------------- 1 file changed, 89 deletions(-)
drivers/staging/lustre/lustre/include/lustre_log.h +0 -89
@@ -80,36 +80,6 @@ struct cat_handle_data {struct llog_handle *chd_next_log;/* llog to be used next */ }; -static inline void logid_to_fid (struct llog_logid *id,struct lu_fid *fid) -{ -/* For compatibility purposes we identify pre-OSD (~< 2.3.51 MDS) -* logid's by non-zero ogen (inode generation) and convert them -* into IGIF */ -if (id->lgl_ogen ==0 ) { - fid->f_seq = id->lgl_oi.oi.oi_seq; - fid->f_oid = id->lgl_oi.oi.oi_id; - fid->f_ver =0 ; - }else { -lu_igif_build (fid, id->lgl_oi.oi.oi_id, id->lgl_ogen); - } -} - -static inline void fid_to_logid (struct lu_fid *fid,struct llog_logid *id) -{ - id->lgl_oi.oi.oi_seq = fid->f_seq; - id->lgl_oi.oi.oi_id = fid->f_oid; - id->lgl_ogen =0 ; -} - -static inline void logid_set_id (struct llog_logid *log_id,__u64 id) -{ - log_id->lgl_oi.oi.oi_id = id; -} - -static inline __u64 logid_id (struct llog_logid *log_id) -{ -return log_id->lgl_oi.oi.oi_id; -}struct llog_handle ;
@@ -286,19 +256,6 @@ struct llog_ctxt {#define LLOG_PROC_BREAK 0x0001#define LLOG_DEL_RECORD 0x0002 -static inline int llog_obd2ops (struct llog_ctxt *ctxt, -struct llog_operations **lop) -{ -if (ctxt ==NULL ) -return -ENOTCONN ; - - *lop = ctxt->loc_logops; -if (*lop ==NULL ) -return -EOPNOTSUPP ; - -return 0 ; -} -static inline int llog_handle2ops (struct llog_handle *loghandle,struct llog_operations **lop) {
@@ -309,18 +266,6 @@ static inline int llog_handle2ops(struct llog_handle *loghandle,return 0 ; } -static inline int llog_data_len (int len) -{ -return cfs_size_round (len); -} - -static inline int llog_get_size (struct llog_handle *loghandle) -{ -if (loghandle && loghandle->lgh_hdr) -return loghandle->lgh_hdr->llh_count; -return 0 ; -} -static inline struct llog_ctxt *llog_ctxt_get (struct llog_ctxt *ctxt) {atomic_inc (&ctxt->loc_refcount);
@@ -421,40 +366,6 @@ static inline int llog_next_block(const struct lu_env *env,return rc; } -static inline int llog_prev_block (const struct lu_env *env, -struct llog_handle *loghandle, -int prev_idx,void *buf,int len) -{ -struct llog_operations *lop; -int rc; - - rc =llog_handle2ops (loghandle, &lop); -if (rc) -return rc; -if (lop->lop_prev_block ==NULL ) -return -EOPNOTSUPP ; - - rc = lop->lop_prev_block (env, loghandle, prev_idx, buf, len); -return rc; -} - -static inline int llog_connect (struct llog_ctxt *ctxt, -struct llog_logid *logid,struct llog_gen *gen, -struct obd_uuid *uuid) -{ -struct llog_operations *lop; -int rc; - - rc =llog_obd2ops (ctxt, &lop); -if (rc) -return rc; -if (lop->lop_connect ==NULL ) -return -EOPNOTSUPP ; - - rc = lop->lop_connect (ctxt, logid, gen, uuid); -return rc; -} -/* llog.c */ int llog_declare_write_rec(const struct lu_env *env, struct llog_handle *handle,
Signature · 1 line
2.1.4
Greg KH
maintainerRe: [Outreachy kernel] [PATCH 2/4] Staging: lustre: lustre_log: Remove unused functions
Quoted 4 lines · Shraddha Barke
Remove the functions which are defined but not used anywhere
--- drivers/staging/lustre/lustre/include/lustre_log.h | 89 ---------------------- 1 file changed, 89 deletions(-)
No signed-off-by line for the whole series :(
PATCH 3/4 Staging: lustre: ptlrpc: Remove EXPORT_SYMBOL for sptlrpc_rule_set_expand
In reply to Shraddha BarkeSince sptlrpc_rule_set_expand is static, export symbol is not needed
--- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/lustre/lustre/ptlrpc/sec_config.c +0 -1
@@ -257,7 +257,6 @@ static int sptlrpc_rule_set_expand(struct sptlrpc_rule_set *rset) rset->srs_nslot = nslot;return 0 ; } -EXPORT_SYMBOL (sptlrpc_rule_set_expand);static inline int rule_spec_dir (struct sptlrpc_rule *rule) {
Signature · 1 line
2.1.4
PATCH 4/4 Staging: lustre: lprocfs_status: Remove unused declaration
In reply to Shraddha BarkeRemove declaration of function lprocfs_wr_timeouts from header file since it is not used
--- drivers/staging/lustre/lustre/include/lprocfs_status.h | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/lustre/lustre/include/lprocfs_status.h +0 -2
@@ -594,8 +594,6 @@ int lprocfs_rd_connect_flags(struct seq_file *m, void *data);struct adaptive_timeout ;int lprocfs_at_hist_helper (struct seq_file *m,struct adaptive_timeout *at);int lprocfs_rd_timeouts (struct seq_file *m,void *data); -int lprocfs_wr_timeouts (struct file *file,const char __user *buffer, -unsigned long count,void *data);int lprocfs_wr_ping (struct file *file,const char __user *buffer,size_t count,loff_t *off); int lprocfs_wr_import(struct file *file, const char __user *buffer,
Signature · 1 line
2.1.4